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.
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.
In this lesson, you will:
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.
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.
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.
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.
Check your understanding before moving on.
0 of 2 answered