Android + IOIO + Simple Analog Input
Simplest possible analog input with Android and IOIO. This article will discuss the bare minimal requirements for development of an Android USB (or Bluetooth) analog input device.
The goal is to demonstrate the easiest possible use of the technology. For additional background information on Android development, IOIO, and electronics, check out these links:
- Android Device (1.6+, 2.1 for Bluetooth)
- IOIO (available at Sparkfun)
- Rotary potentiometer
- Power supply
- Hook-up wire
Connect one side of the potentiometer to +3.3V, the opposite side to GND, and the center wiper to the desired analog input pin on the IOIO. The example uses pin 34, but can be used with other pins that support analog input (pins 31 – 46 on the IOIO). Here is a diagram of the completed circuit (created with Fritzing):
Get the source
git clone git://github.com/mitchtech/android_ioio_simple_analog_input.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.