December 22, 2012

In The Meantime : IOIO XMas Tree

While I'm waiting for the TFT Touch Shield (a December give-away from Seeedstudio) to start the next project, I've build a programmable XMas Tree with an Android phone and a IOIO board.

This is the XMas Tree in action (photo by +Aygul Zagidullina at the Nerdmare Before Christmas event):

IOIO (pronounced: yo-yo) is a product which lets you connect electronic circuits to an Android device and control them from an Android application. [1]

I've connected pin 3, 4, 5, and 10, 11, 12, 13 with seven 120 Ohm resistors and blue LEDs. For a detailed description of the pins take a look at Getting To Know The Board :

... and for the tree I've used a cardboard:

The IOIO Xmas Tree is programmed with an Android phone. For each light there's a toggle button, to turn the light on and off. The time which it takes to change the state is also recorded.


Programming the IOIO board is simple (if you're choosing useful pins middle in the night). In the setup method you define which pin is a digital output:

leds[i] = ioio_.openDigitalOutput(pins[i], true);

... and inside of the loop method you just write true or false to set 5V or 0V to the pin and therefore turn the light on or off:

leds[i].write(false);

Source code of the Android project is available on Github/choas/IOIOXMasTree.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.