Lesson: Start Programming

Overview: 
Examine the details of using Android Studio to create OpMode classes.
Objectives: 

Understand how to use Android Studio to create OpMode classes, compile them and download them to the robot controller phone.

Content: 

Now its time to get more familiar with Android Studio and writing OpModes.

Watch this video on writing OpModes.

Remember, each time we change an OpMode's source code, we must recompile and download the newly updated robot controller app to the controller phone. Compiling in Android Studio will take of the download as long as your PC is connected to the controller phone with a USB cable or via WiFi.

The first time you connect your controller phone to your PC with a USB cable, the phone should install the USB driver needed for AS to communicate with your phone. If this driver install is unsuccessful and the phone is the ZTE, disconnect and reconnect the phone. When the dialog opens asking what you want to do with the USB device, select the AutoRun option. This should run the ZTE USB driver installer. Once install is complete reconnect your phone. The phone should now be visible to AS. If it is still not working, go to phone settings, Connect to PC, and make sure the Media Device and Enable USB Debugging options are selected. Reconnect.

Also the first time you connect the controller phone to your PC, the phone will prompt you accept the RSA Security Key presented by your PC to the phone. Set the option to always accept the RSA Key from this PC and click Ok.

 

Navigation: