Skip to lesson
Westlake RoboticsLearn
Vault

FIRST Tech Challenge

Loading progress…

  • Your FTC Software Map
  • Install Android Studio and SDK Tools
  • Connect with the Android Studio ADB Plugin
  • Open and Build the FTC SDK Project

Connect with the Android Studio ADB Plugin

Use the team's Android Studio plugin to connect to the Control Hub and recognize when the problem is the connection rather than the code build.

Workstation SetupSetup

In this lesson, you will:

  • Install or open the team-approved ADB plugin in Android Studio.
  • Complete the first connection with a USB cable, then reconnect over the team network.
  • Confirm the Control Hub appears as an Android Studio deployment target.
Your browser does not support embedded video. Use the open-video link below.
0:00 / 0:00
Connect to the Control Hub with the Android Studio ADB pluginOpen video Download captions
Video transcriptRead or search the narration

All right, so the next thing we need is the plugin we use to connect Android Studio to the Control Hub. It uses ADB underneath, but you are not going to be typing ADB commands into a terminal. For our team, you will do all of this through the plugin inside Android Studio. To install it, open your Android Studio settings and go to Plugins. On the Marketplace tab, search for the plugin ADB. It is ADB Wi-Fi. Make sure you choose this exact one because there are a bunch of plugins with very similar names. Press Install, and if Android Studio asks you to restart, go ahead. We are just going to do that anyway to make sure that the changes take place. You only have to do this part once, unless we change plugins later. The layout may look a little different after the update, but the important parts are the same. Most of the time, this menu is all you need, right here, for ADB Wi-Fi. There is one important thing about setting this up on a new project or computer. The first time you connect to the Control Hub, you need a USB cable. Plug the computer directly into the Control Hub's USB-C port, then use the plugin to make that first connection. That wired connection gets the computer and Control Hub set up, so the plugin can connect over the network later. Wait until this sidebar shows that it is connected, or finish whatever first-time step it gives you. After that first wired setup, normal connections are super easy. Just make sure your computer is on the robot's network. Open this plugin menu and choose the Control Hub. If it is not already selected, press Connect. Most of the time, that should be it. Once it says connected, check Android Studio's device selector right here. If the Control Hub appears there, then Android Studio can see it as a target. That does not mean your code is correct or that the robot works. It only means the connection is ready to be deployed to. If Connect does not work, first check whether somebody else is already connected to that Control Hub through ADB. Ask the other programmers. If someone is connected, have them disconnect before you try again. Make sure you are on the correct robot network, and try disconnecting and reconnecting once. Do not start changing Java, Gradle, or TeamCode because the connection fails. That is all you need for this plugin. Install it, use a wire the first time, and after that, connect over the network. Next, we will look a bit more in depth at how to actually code an FTC project.

Use the same connection workflow as the team

Install the approved plugin from Android Studio's Plugins settings and open its connection menu. The plugin uses ADB underneath, but new programmers do not need to manage ADB from a terminal for the team's normal workflow.

Use a wire once, then connect over the network

For the team's setup, connect a new computer to the Control Hub with a USB cable the first time. After that initial setup, join the approved robot network, open the plugin, and press Connect. A successful connection should make the Control Hub available in Android Studio's device selector.

Check with the team before troubleshooting

If Connect does not work, first ask whether another programmer is already connected to that Control Hub. Have them disconnect before changing settings, reinstalling the plugin, or blaming the code.

Practice

With a mentor or approved team setup, install or open the Android Studio plugin. Use a USB cable for the first connection on a new computer. Then disconnect the cable, join the approved network, press Connect, and confirm the Control Hub appears in Android Studio's device selector. If it fails, check whether another programmer is connected before recording the exact redacted status.

Checks

  • The team-approved plugin is installed and can be opened in Android Studio.
  • The learner knows the first connection on a new computer uses a USB cable.
  • The learner knows later connections use the approved network and the plugin's Connect control.
  • The connected Control Hub appears in Android Studio's device selector.
  • A failed connection prompts a check for another connected programmer before settings are changed.

Lesson check

Check your understanding before moving on.

What should a new computer use for its first connection to the Control Hub?
What should you check first if the plugin normally works but will not connect now?

0 of 2 answered

References

Configure Android StudioOfficial Android Studio guidance for installing and managing IDE plugins.Android Debug BridgeBackground reference for the connection system used by the plugin; terminal use is not required in this lesson.
Loading lesson progress
Previous lessonInstall Android Studio and SDK ToolsNext lessonOpen and Build the FTC SDK Project