Technology forum FAQ
Just thought I would start a FAQ specific to technology questions, seems like we could use one here in the forum. Please feel free to contribute.
Q: What hardware should I buy?
A: FTC is working with Modern Robotics to provide hardware kits, including the new USB modules and USB sensors: http://modernroboticsinc.com/
Q: What Android devices should I buy?
A: At a minimum you will need two Android devices, one for the drivers side and one for the robot. FTC is working with Qualcomm to provide kits with two Snapdragon powered ZTE Speed phones, including other options such as cables and joystick controllers. Kits can be purchased during registration:http://www.usfirst.org/roboticsprogr…c/registration
Q: Can I use my own Android device?
A: FTC desires that all teams use (and is officially supporting) the ZTE Speed for the first year of the transition. The official FTC technology FAQ states: “Game rules will not preclude the use of alternate Android devices, and FIRST will create a list of specifications for suitable Android devices; however teams will be on their own to determine if those devices work.” http://www.usfirst.org/roboticsprograms/ftc/technology
Q: What software do I need?
A: At a minimum you will need software to compile and install Android apps which are written in the Java programming language. FTC is officially endorsing two Java Integrated Development Environments(IDE). The first is Android Studio which is available for free from Google:https://developer.android.com/sdk/index.htm The second is App Inventor available through MIT which is a cloud-based tool, meaning that you can build apps right in your web browser: http://appinventor.mit.edu/explore/
Q: I don’t know anything about Java or Android, where should I start?
A: FTC will be providing training resources for rookie teams and for those new to Java and Android. The FTC Technology Forum is also a good resource for questions about getting started: http://ftcforum.usfirst.org/showthre…med-Start-here
Q: How do I control a robot with Android phones?
A: For autonomous behavior the robot will be controlled by an app of your design running on the Android device attached to the robot. This app will communicate with motor and servo controller modules and sensor modules over USB. The SDK provided by FTC will include an API for communicating with these modules. For driver controlled behavior the robot will be controlled by joystick controllers connected to an Android device at the driver station over USB. This driver side device will then communicate to the robot side device over Wi-Fi Direct: http://en.wikipedia.org/wiki/Wi-Fi_Direct
Q: How do I program an Android phone?
A: Android apps are written in the Java programming language using the IDE of your choice. Any Java program written for Android must use an Android SDK which provides an API specifically for Android devices. The Java program is then compiled into an Android app, or “package”, and installed on the device where it can be tested.
Q: Which Android SDK should I use?
A: The ZTE Speed runs Android 4.4 also known as “KitKat”. When setting up your IDE you can use a more recent SDK as long as you are careful not to use features that are not available in Android 4.4. If you have any doubt then install the Android 4.4 SDK which corresponds to API 19. You can also edit the manifest file in your Android project to target specific API’s.
Q: How do I use the FTC SDK?
A: At a minimum your Android project should include the Java libraries provided by FTC. These libraries will provide Java classes that you can use to interface with the USB modules.
Q: How do I install an app?
A: In addition to installing the Android SDK in your IDE you also need the Android Development Tools (ADT) which include utilities specific to managing and interfacing with connected devices, the most important of which is Android Debug Bridge (ADB). ADB usually runs in the background and manages installing packages on those devices, either physical hardware or software emulators, but it is also a command line utility that has options for viewing and interacting with devices.
Q: What is the workflow in a nutshell?
A: Once you have a Java IDE configured with the Android SDK and ADT then you write your application code, then compile into an app, then install the app either on a physical device connected via USB, or on a software emulator for testing and debugging.http://developer.android.com/tools/workflow/index.html
Q: How do I debug an app?
A: When installing an app via the IDE you can invoke the debugger tool by running the app in debug mode or by setting breakpoints in the code. You can also attach the debugger manually via ADB to an already running app. More info here: http://developer.android.com/tools/debugging/index.html
Q: Do I always need to be connected with a USB cable?
A: No, it is possible to connect to a device wirelessly from ADB. More info here (scroll to bottom) http://developer.android.com/tools/help/adb.html
Q: What if I don’t have a wi-fi network?
A: You can try setting up a wireless hosted network on your dev machine assuming it already has an onboard wi-fi adapter (which most newer machines do)
Q: What is the difference between “wirelss ADB” and “Wi-Fi Direct”?
A: Wireless ADB is a feature found only in the Android SDK that allows you to connect to Android devices wirelessly from your IDE for the purpose of installing and debugging Android apps without the need to connect the device with a USB cable first. Wi-Fi Direct is a feature available on many other devices besides Android and is a widely adopted peer-to-peer communication protocol.
Q: Do I need a special app on my Android device to connect to ADB wirelessly?
A: No. The connection is established from the ADB command line on your dev machine. Once the wireless connection is established you can use the device just as you would if it was connected via USB.
Q: Do I always have to connect the device to the IDE to run my app?
A: No, once your app is installed you can run it any time just as you would any other Android app.
Q: Do I need to connect both of my Android devices to the IDE at the same time?
A: No, there is no need to have both driver and robot side devices connected to the IDE at the same time, only the device you currently wish to install and/or debug an app on. The driver side device communicates to the robot side device via Wi-Fi Direct which is completely independent of whichever device is connected to your IDE.
Q: Will FTC provide a template?
A: Yes, FTC will provide both pre-compiled apps and Android project templates.