Nicolas Oros
The Android Car
-
In May 2011, I started working on a side project that consisted of creating a simple robotic platform using a R/C car and an Android phone.
The car is controlled by a IOIO board, plugged to a smartphone phone that receives motor commands from a computer over Wi-Fi or 3G (Wi-Fi in this video).
The phone also sends the video and the values from the acceleration and orientation sensors back to the computer.
The communication protocol between the phone and the computer is UDP.
The whole project was programmed in Java.
-
You can buy the IOIO here:
Sparkfun
-
I used the Java Slick library for the program running on the computer:
Slick 2D
-
Some of my code was based on these projects/tutorials:
ViewfinderEE368
IBMEyes
-
You can find the source code below. The Android app runs fine on the HTC Incredible 1. You might have to change certain parameters to make it run on other phones.
Please be advised that I've uploaded the code now due to the high number of requests I've received, but the project is not finished,
and the code is not optimal or commented yet. There are also other features I want to add and/or modify. However, it should provide a basic framework
for many people working on a similar project.
I will try to comment the code when I have the time, but keep in mind that this is a side project for me and that I have many other things to do...
Also, this is my first Android project so I am sure that there are ways to optimize the code and do certain things differently.
-
So please, let me know if you find bugs or if you improve my code. You can post comments/questions on the discussion page or directly on YouTube and I'll try to answer them rapidly.
-
You can find a discussion on the IOIO google group here:
IOIO discussion
Source code
-
Android App
Download here: Android_CAR.apk
-
Android App (Eclipse project)
Download here: Android_CAR.zip
-
Computer Client (Eclipse project)
Download here: PC_UDP_client.zip
-
You will have to start the client running on the PC first, then start the Android app.