Remote Control Via Android

The motorized orange thing project is a wrap. Well, as wrapped as it will be for the time being…Katie is full term, so we are working on borrowed time. I managed to introduce remote control to the orange thing via Android and my IOIO board.

I found a goofy motorized alarm clock, Clocky, on Woot a while ago. My first thought was something along the lines of ‘that looks like a great thing to tear apart.’ The unit is designed to make a lot of noise, and drop off the nightstand when the alarm is triggered…key features are its ‘ruggedness’ and two-wheel design. Pretty slick platform for horsing around with my IOIO.

Once it arrived, I began ripping it apart:

clocky's guts

clocky's guts

My focus points were fairly straight forward…keep the drive train system intact, and gain control of the motor function. The stock power was via four AAA batteries, so I did some testing with my 3.3V outputs on the IOIO:

breakout to ioio

broken-out

My 3.3V connections really made the unit crank. The on-board DC motors were fairly snappy…looked promising. I broke out the leads from the battery holder as well, figuring that I *may be able to drive the IOIO with the 6V. That is when thing got sort of dicey…I could run over a hard connection, but the current needs of the board / bluetooth setup was too great for this application.

I determined that I would need to introduce some technology, which ramped up the complexity of the build by a bit. Luckily, I had a Adafruit MotorSheild collecting dust on my bench. I scrapped one of the H-Bridge chips, and mounted it on a simple test board:

wires and dev boards

wires galore

This approach worked. DC motors are power thirsty little bastards…keeping my power sources isolated was the key to getting everything running w/o issues. Basic setup became this mess:

android ioio

proof of concep

Zip ties, electrical tape, Altoids tin, some swearing, etc. later…

ioio project finihed

fugly project is fugly

…weird orange thing is ready to roll. Check the video:

Down the road, I would like to turn orange thing into a mobile mount for the phone itself. The end-goal of this whole bizarre project would be to have a web-controlled vehicle with on-board video streaming. I need to do some research and figure out how to mash around the video feed…going to have to step the Java game up a few notches. That takes time, and spare time is not abundant…it could happen though.

I will dump this code on GitHub and throw the apk on the Android Market. Stay tuned.

Android SDK / Eclipse / Ubuntu

I updated to Ubuntu Oneiric Ocelot last week. For some reason, the automatic upgrade process botched pulling over my Android Development Tools (ADT) components. Chalk this one up with the strange camera issue I am seeing, as two votes for bailing on a fixed release cycle. Canonical has pushed out two consecutive iffy builds…but I digress.

It had been a while since I had set my Android development environment up. I had to start from scratch, so figured I would spell out the process.

Note the lack of “Android *” from the list of installed components:

eclipse ubuntu android sdk

...no sign

I’m starting from the point of having Eclipse installed. That part is straight forward…I snagged it off of the Ubuntu Market, but you an do it with Aptitude or however you like. Same goes for the JRE and JDK, the Java Runtime Environment and Java Development Kit. Snag those from the Market, Sun’s site, or apt – get…verify you have the correct version by running “java -version” from the command line. Mine is currently:

swantron@Dell15:~$ java -version
java version “1.6.0_23”
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre10-0ubuntu5)
OpenJDK Server VM (build 20.0-b11, mixed mode)

The Android SDK is the next component to snag. It has two pieces: Standard SDK (starter package) and SDK components. The later is where you can grab pieces to test Galaxy Tabs…stuff like that. The specifics are located there. You first need to download the starter package from d.android.com/sdk and run the UI. There you can pick and choose the pieces you want to implement, manage emulators, etc.

The last piece is the actual Eclipse plug-in. It is simple to implement. Navigate to Help . Install New Software, and feed through the process until you are asked for a site location. Said site is dl-ssl.google.com/android/eclipse

A restart should have Eclipse up and running. Give a shout if it doesn’t…after doing this a few times, I am becoming somewhat of an expert.