WEBVTT

00:00:00.000 --> 00:00:06.300
All right, so the next thing we need is the plugin we use
to connect Android Studio to the Control Hub.

00:00:06.780 --> 00:00:12.060
It uses ADB underneath, but you are not going to be
typing ADB commands into a terminal.

00:00:12.740 --> 00:00:17.100
For our team, you will do all of this
through the plugin inside Android Studio.

00:00:17.860 --> 00:00:23.600
To install it, open your Android Studio settings
and go to Plugins.

00:00:23.600 --> 00:00:31.240
On the Marketplace tab, search for the plugin ADB.
It is ADB Wi-Fi.

00:00:31.760 --> 00:00:35.940
Make sure you choose this exact one because there are
a bunch of plugins with very similar names.

00:00:37.280 --> 00:00:45.520
Press Install, and if Android Studio asks you to restart,
go ahead.

00:00:46.020 --> 00:00:51.140
We are just going to do that anyway
to make sure that the changes take place.

00:00:53.600 --> 00:00:57.640
You only have to do this part once,
unless we change plugins later.

00:01:04.560 --> 00:01:12.800
The layout may look a little different after the update,
but the important parts are the same.

00:01:14.780 --> 00:01:21.780
Most of the time, this menu is all you need,
right here, for ADB Wi-Fi.

00:01:21.780 --> 00:01:26.700
There is one important thing about setting this up
on a new project or computer.

00:01:27.000 --> 00:01:31.180
The first time you connect to the Control Hub,
you need a USB cable.

00:01:31.880 --> 00:01:39.260
Plug the computer directly into the Control Hub's USB-C port,
then use the plugin to make that first connection.

00:01:39.840 --> 00:01:45.680
That wired connection gets the computer and Control Hub set up,
so the plugin can connect over the network later.

00:01:45.680 --> 00:01:55.640
Wait until this sidebar shows that it is connected,
or finish whatever first-time step it gives you.

00:01:56.060 --> 00:01:59.700
After that first wired setup,
normal connections are super easy.

00:02:00.280 --> 00:02:02.560
Just make sure your computer is on the robot's network.

00:02:02.940 --> 00:02:05.920
Open this plugin menu and choose the Control Hub.

00:02:05.920 --> 00:02:09.700
If it is not already selected, press Connect.

00:02:10.340 --> 00:02:12.040
Most of the time, that should be it.

00:02:12.560 --> 00:02:17.580
Once it says connected,
check Android Studio's device selector right here.

00:02:18.200 --> 00:02:22.280
If the Control Hub appears there,
then Android Studio can see it as a target.

00:02:22.820 --> 00:02:25.980
That does not mean your code is correct
or that the robot works.

00:02:26.060 --> 00:02:28.240
It only means the connection is ready to be deployed to.

00:02:28.240 --> 00:02:36.440
If Connect does not work, first check whether somebody else
is already connected to that Control Hub through ADB.

00:02:37.120 --> 00:02:42.580
Ask the other programmers. If someone is connected,
have them disconnect before you try again.

00:02:43.720 --> 00:02:49.500
Make sure you are on the correct robot network,
and try disconnecting and reconnecting once.

00:02:51.200 --> 00:02:56.620
Do not start changing Java, Gradle, or TeamCode
because the connection fails.

00:02:56.620 --> 00:03:00.660
That is all you need for this plugin.

00:03:01.400 --> 00:03:05.020
Install it, use a wire the first time,
and after that, connect over the network.

00:03:05.840 --> 00:03:13.020
Next, we will look a bit more in depth
at how to actually code an FTC project.
