Getting Started with Programming

Options:

  • Blocks

  • OnBotJava

  • Android Studio

Blocks

Why use it?

  • Visual programming (drag-and-drop)

  • Generates Java code from the blocks

  • No computer software required

    • Runs in a web browser when connected to RC

    • Code is stored on RC

  • Intended for folks who’ve never written code before

    • Limited usability beyond what’s available

  • Limited support from other teams and volunteers as many people aren’t experienced with blocks

How do I get started?

OnBotJava

Why use it?

  • Much simpler to setup than Android Studio

  • All code is stored on the RC

  • No clutter of other classes

How do I start?

Android Studio

Basic Steps

To get started with Github, Android Studio, and Java Programming, you will need to follow these steps:

  1. Create a Github account if you haven't already

  2. Fork the FTC Robot Controller repository, look at this for help and more info

  3. Download Android Studio, instructions here

  4. Clone your forked repository, instructions here

  5. Open the project in Android Studio

  6. Code

  7. Send the robot your updated code

  8. Setup a config on your robot

  9. Start controlling your robot!

Android Studio Tutorial

Android Studio Setup

Android Studio Setup Video Tutorial:


Android studio is one of the more intuitive IDE's I have encountered. There are a lot of things that you can get lost with easily though.

Gradle - The gradle is the way your app (robot) will run

ADB - Android Debug Bridge is the way your computer will connect to the control hub and build the application

How does everything work?

  • Basically, when you hit upload, it runs and installs an app to the robot's control hub. What this does is allow it to run effectively while connected to the driver station. The gradle is the way that this app gets built. This is also why it is so important to fork the FTC Robot Controller. They make the onboarding steps so much easier just because all of the work for setup is done for you.

Plugins

I have encountered a bunch of plugins for AS that make the experience so much better. None of these are mandatory but may improve your experience. You access this page in the settings for AS.

  • ADB Idea - Allows you to effectively use ADB with your computer to make sure everything is working properly.

  • Better Comments - Changes your comments to different colors with different tags. This is extremely beneficial because it catches your eye more so you can leave notes for yourself.

  • CodeGlance Pro - This improves the normal sidebar you will see when scrolling, it shows you the color of all of your code so you can easily see where you might need to be looking.

  • Discord Integration - Definitely not necessary but very fun to use and show everyone which project you are working on in Discord.

  • Dracula Theme - My personal favorite theme for AS because it looks very nice and the color coding makes a lot of sense to me.

  • GitHub Copilot - A very useful companion when you are coding. It is a subscription that you can get free with GitHub Student Developer but basically allows you to have an AI "copilot" built in to your IDE for code completion and general help.

  • SonarLint - This is a very nice "linting" or code checking software that can provide helpful resources to tell you where something might be broken, or when you aren't following proper programming practices.

  • Star Wars Progress Bar - My personal favorite plugin I have. All it really does is change your progress bars to Star Wars ships. It adds a lot of fun to the IDE.

Setting up Git

Forking

Cloning the repository

To clone the repository, first find it on your GitHub profile. You have 2 options on what to do you can do it through android studio or through GitHub. Everyone on a team will need to do this!!

GitHub basics

GitHub is organized in a few sections. One, the code section, this is where your code and files are stored. Your repositories, where all of your code is stored and your profile, where all of your repositories are stored.

Commits

Push

  • What is a push?

Pull/merge

  • What is a pull?

Managing your server

Personal Access Token

In github, tap on your profile ( top right corner ), then:

Video Explanation of GitHub

Last updated