« « Arduino RC Car Gets Bluetooth, Python Interface | New Toys! » »

Ultrasonic and Compass Out, Android In

Sep 16, 2012 by     No Comments    Posted under: Arduino, Self Driving Car

I hit a wall today with the self driving car. My Arduino code was hanging when I tried to use the ultrasonic sensors along with my existing Bluetooth code. I tried running the sensors as a separate thread, but when that didn’t work I decided to rethink the project. My ultimate goal is to attach a camera to the car so I could do some image processing and have a legitimate self driving car. The problem is that the Arduino isn’t powerful enough to process images from a camera, or fast enough to stream them back to my laptop for processing.

Instead of pulling my hair out trying to get the sensors to work, or spending a bunch of money on a new microprocessor that could handle image processing, I decided the best solution was just to use my Android phone as the camera and accelerometer, and to stream the data back to my laptop over WiFi. This will give me access to all the capabilities that are built into my phone, like GPS, Bluetooth, WiFi, accelerometer, camera, infrared, etc.

So today I ripped off the ultrasonic sensor and compass, and made a new mount for my phone that attaches to the front of the car. (Have you tried Instamorph, by the way? It’s great for building prototypes and testing ideas.) Next up, streaming the images from my phone back to my laptop, processing the images and deciding which way the car should go, and sending those instructions back to the car over Bluetooth. Back to work!

Edit: Fail- I mounted the camera facing backwards. Tomorrow I’ll remount it facing the right way.

Self Driving Car with Android Mount

Self driving car with Android mount- Ready to do some image processing!

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>