Friday, March 30, 2012
RC Car Update 2
Before i dive in; for anyone that doesn't know what this is: This is a cheap RC car that i bought from Walmart. I am putting a Arduino and a Windows Phone on it so that i can control it wirelessly from my computer. A C# program on the computer will receive video from the phone over WiFi and send arrow key "events" to the phone which will then tell the Arduino via Bluetooth to go forward/back etc. I am currently working on getting the Windows phone to send video to the computer, but i found that the phone doesn't have a Bluetooth API, so i cant develop with Bluetooth to send commands to the Arduino from the phone.
While swirling ideas around in my head about how to get around this, i came up with this: A photo resistor senses how much light is reaching it, right? In the same way i am sending video to the computer from the phone, i can send data to the phone. So, if i place a photo resistor, or two, flush with the screen of the phone, and change the color that is displayed on the screen. The photo resistors will sense the brightness level and know the difference between the black and white screen. I tried this out with my Arduino, and it worked great! I didn't even have to use drastic color changes like white and black for it to work. I pulled up an image on the screen of the phone that had black, red, and orange squares and the Arduino had three distinct values from the photo resistor as i moved the photo resistor around to the different colors!
In the end it should work like this: if i press the up arrow key on my keyboard, a portion of the phone screen turns white; the Arduino will read the value of the photo resistor and if it finds the value from the photo resistor to be within the set threshold for white, it will trigger the RC car forward button!