DIY‎ > ‎

Long Exposure Toy

The long exposure toy uses an arduino, wiimote, and processing to draw an existing picture into space during a long exposure, a flash at the end (or beginning) capturing the surrounding environment. This will present the picture floating in the air, and providing a good deal of artistic freedom.

Parts necessary:
Arduino
1 Wiimote
Bluetooth communication for computer (I used this dongle, which should be unnecessary if you have bluetooth built in to you computer).

The trickiest part of this is getting the Wiimote/Processing communication working. To get mine to work I went of off a couple sources, which I've compiled here.

I did this on Windows XP, so if you're using Vista or Windows 7 things may be different.



Windows (what I did):

Download the following, paying attention to the version required (some of the more recent versions break compatibility):



When you have the appropriate files downloaded, put them in the folders described in http://www.instructables.com/id/virtual-graffiti/step6/computer-setup-processing-and-the-wiimote/. On PCs, the default location for Processing library files is in My Documents\Processing\libraries

You can try the attached pr_ledstuff_nowii.pde file and any image file (I also attached the image I used, obama.png) to verify the communication works. If you don't have your IR LED hooked up to anything just point it at any incandescent light (CFLs and fluorescent lights won't work). When it says "trying to find a wii", press and hold the 1 and 2 buttons on the wiimote and it should connect, sometimes taking as much as 30 seconds for me.

IMPORTANT! If you close the sketch before you have disconnected the wiimote (or it throws an error), you will have to restart your computer to get the information out of the bluetooth stack. To disconnect the wiimote, press and hold the power button on the wiimote until the Processing window says that it has been disconnected.

To add the arduino in to the mix, download and follow the installation instructions for the Arduino library for Processing here. Open the Arduino program and click the "Open" button on the toolbar (not File->Open), select Firmata, then StandardFirmata, and download to the arduino. This allows your processing sketch to interact with the arduino's inputs and outputs.

To connect the hardware up (RGB LED and IR LED), look at the datasheet for the LED you are using to determine which leg is the common anode and which leg corresponds to which color. With the RGB LED I used (linked to above), having the longest leg second from the right and looking at the arduino with the digital pins toward me, the leftmost leg went into digital 9, the left right of that went into digital 10, and the rightmost left went into digital 11. The remaining leg (the common anode) should go into ground. With the IR LED I just put it so that the longer leg went into the 5V port and the shorter leg went into the ground port right next to it.

I know this is bad electronics style, and you should use current-limiting resistors between the 3 legs and their corresponding digital ports. I didn't feel like having to use a breadboard or buy more parts, so I just took the shortcut and haven't burned anything out yet. If you are using resistors, the datasheet for the RGB LED suggests values.

To test everything, download the pr_ledstuff.pde and run. You may have to change the line that reads "arduino = new Arduino(this, Arduino.list()[1], 57600);" to be whatever port your arduino is connected on (in my computer it was COM3, which was the 2nd item in the list, thus Arduino.list()[1]).
ą
obama.png
(26k)
Ned Fox,
Jan 21, 2010, 12:44 PM
ċ
pr_ledstuff.pde
(1k)
Ned Fox,
Jan 21, 2010, 12:43 PM
ċ
pr_ledstuff_nowii.pde
(1k)
Ned Fox,
Jan 21, 2010, 12:43 PM
Comments