Android + IOIO + Laser Tripwire
Laser tripwire with Android and IOIO. This article will demonstrate a proof of concept laser beam tripwire accessory.
For additional background information on interfacing Android with IOIO, check out my other introductory tutorials:
Background on Android development, IOIO, and electronics:
- Android Device (1.6+, 2.1 for Bluetooth)
- IOIO (available at Sparkfun)
- 10k ohm resistors
- Laser (like this one at DealExtreme)
- Power supply
- Hook-up wire
Connect one lead of the photocell to +3.3V and the other to the desired analog input pin (pin 35 below). Also connect that same lead through a 10K resistor to GND creating a voltage divider. Other IOIO pins can be used, as long as they support analog input (pins 31 – 46 on the IOIO). Connect the red leads of the laser to +3.3V and the black lead to GND (or use a battery powered laser). Here is a diagram of the completed circuit (created with Fritzing):
Get the source
git clone git://github.com/mitchtech/android_ioio_laser_tripwire.git
If you are building from source, you will also need to import the IOIO Library project, and optionally the IOIO Bluetooth library projects, both available here:
git clone git://github.com/ytai/ioio.git
Install, connect, profit!
Finally, upload the app to the Android device (or browse to this page on the device and download the apk above). Connect the device to the IOIO, and start up the app.