Thanks to the LED Empire for coming to the meeting and learning about the new system with us. We will work together ore on the programming in the future!
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.
We are in a quest to run with JAVA! As the new wireless system for the robots begins next year, our team begins its understanding of the coding language Java. (Does anyone else wish this counted for a foreign language on their transcript?)
We’re beginning with just understanding what Java is.
Download the most recent version of Java for your computer from this site: https://java.com/en/download/manual.jsp Choose the appropriate version for you computer. Most computers will need the Windows 64-bit version.
Here’s a site that allows you download Java for free. Eclipse.org (Again, go with the 64-bit version unless your computer is running a 32-bit OS) -you might not understand it yet, but it’s on your computer! (It will take a while to download, so start that engine for download and go learn new origami creatures, walk your pets, and make soup for your mum, and then come back and see if it’s done. ) Once downloaded, try and launch Eclipse by clicking on the eclipse.exe file.
Here is a free Java introduction course from our very favorite MOOC- Udemy.com . It’s more than you can cover in one sitting, but it will give you a good overview in a few videos. But you can also watch the tutorials on the eclipse download
From the FTC forum:
I’ve noticed that a few teams are getting a bit overwhelmed by the switch to Android based robotics. It’s easy to see why, there is a lot to learn if you are new to Java and/or Android. The biggest problem seems to be people trying to learn it all at once, which can easily get painful. Much better to take it one step at a time. There are a ton of resources available for learning how to write and deploy Android apps that people can start doing now, long before we get to see the FTC SDK. Here are my recommendations:
STEP ONE: Learn Java.
A google search on “learn java” yields thousands of results, here is a nifty online learning environment that you can start using now without installing a Java IDE:
Which brings us to:
STEP TWO: Install and learn to use a Java IDE.
Once you are familiar with Java basics it is time to take the plunge and install an Integrated Development Environment (IDE). The obvious choice is Android Studio:
but there are other options available including Eclipse (among others):
It is important to note that the Android SDK and Android Development Tools (ADT) can be installed after you install a Java IDE. In the days before Android Studio it was typical to install an IDE such as Eclipse first and then install and configure the Android SDK and ADT.
If you choose to install Android Studio as your IDE then installing and configuring the Android SDK and ADT is already part of that installation process. Much more information here:
The other IDE option that has been endorsed by FTC is the MIT App Inventor, a cloud-based tool which means that you can build apps right in your web browser. More information here:
STEP THREE: Learn how to create and deploy Android apps.
This is where most teams are really going to need to do their homework. The Android SDK can seem overwhelming at first, and there are a number of concepts that are unique to Android such as “activities” and “intents”. There are also a number of different “flavors” of Android SDK to choose from (and new ones coming out all the time), so it is important to understand what your target SDK is and what features it supports.
Fortunately there are a ton of resources for getting started with the SDK on the Android Developers website:
It is well worth taking the time to thoroughly understand the basics of the Android SDK before you tackle the next step, which is:
STEP FOUR: Mastering the Android development workflow.
Your first taste of this should be the “hello world” app at the training link above, but at a minimum you should learn and understand all of these concepts:
– Creating an Android project from scratch
– Connecting and managing devices for testing, these can include software emulators known as “AVD’s”.
– Compiling and deploying an app to a device from the IDE
– Debugging an app from the IDE
Much more information here:
STEP FIVE: Mastering the Adroid Debug Bridge (ADB)
For much (if not most) Android development this step is optional, ADB typically works in the background to manage connected devices and it is usually enough to simply connect a device over USB cable, or create software emulators, and let ADB do the rest.
For purposes of FTC, however, it could be extremely useful to understand how to connect devices wirelessly to avoid being tethered to a USB cable. This is where mastering ADB comes in very handy. There are a number of command line options available for viewing and interacting with connected devices via ADB, including options for connecting to devices wirelessly. Much more information here (scroll to bottom to see wireless instructions):
If you do not have (or do not wish to use) an available wifi network for wireless communication then you may need to take the extra step of setting up a host network on your dev machine. Fortunately this is not hard to do, more information on how to do this in Windows8 here:
It is very important to note that ADB is NOT the same as the debugging environment which is invoked manually by either running the app in debug mode or setting breakpoints in the code. You can also use the Logging service to output simple events and messages to the Log window without invoking the debugger. More information on debugging here:
STEP SIX: Robots!
Now that you have mastered all of the steps above you are finally ready to program some robots! Unfortunately, at the time of this writing, the FTC SDK has not been released and so we do not know much about the specifics of it yet.
We do know that the primary purpose of the SDK is to interface with the new USB control and power modules, and that it will probably come in the form of Java libraries that you make available to your Android project via the IDE.
FTC has also made clear the intention to provide template Android projects and other training resources available for those that don’t mind waiting until the SDK is released. More information here:
This is not meant to be a comprehensive guide to Android development by any means, but hopefully it will help get people started with as little pain as possible. Keep an eye on the FTC technology forum for more details and helpful answers:
Intro to the devices: Ken Johnson, Director of FIRST Tech Challenge announces exciting new android-based platform for the upcoming 2015/2016 season! Please direct all questions to our FTC Tech Forum, http://goo.gl/Ht1vuS
Demonstration of what it will look like from the user side-
More details on the devices:
He finally got to my burning question about minute 4:30- how much will it cost? He says under $400, though no hard and solid figures have been generated.
Here is the slightly “scary” forum post about java where one coach freaks out and panics about the upcoming java coding platform and gets talked off the ledge by several other coaches giving helpful advice and free learning websites for java. Links for free Java coding sites are in the posts.
Update on the FTC approved phone: ZTE Speed. Here’s a nice FAQs forum post-
There is much to be learned in victory. There is more to be learned in defeat. We got a little of both on Saturday. We’d like to thank our sponsors- Jefferson Labs, for providing amazing spectrum glasses for us to give away to other teams and spectators, to Solidworks, for giving us CAD software! , and to Ekocycle, for providing our team with a 3-d printer. Congrats to all the fine teams that are moving on! You worked hard and it showed.
The robot is a smaller size, sans linear slide for the center goal, and has been stripped to its most useful, essential parts- grabbers and movers. A works on programming, while Leigh and Asher complete the schematic for the programmer to follow. Arik and Ezra work on adding the mini-linear slide for gripping the pushed rolling goals.
We have our new 3-d Ekocycle Printer now. This week we’ll start printing the numbers on our robot for a 3-d project starter 🙂 We’ll get back with you on images of that event as it happens!
The first thing we printed was a hurricane vase, which had to be stopped after it was a few inches tall because one of the color extruding tubes kept getting in the way and messing with the print job. It wasn’t awful, but we paused it, which allowed us to figure out pausing our 3-d printer stops it, without a chance to restart it where we left off. Lesson learned! We raffled the vase off and Austen was the lucky winner.