Instructables

Wii Remote IR Camera Hack with Arduino Interface

Featured

Step 5: Program the Arduino

This is pretty easy and the fellas who I've linked to worked out most of the details. Good thing, we can get straight to playing around with it.

If you need information about arduino's, just google it. I found all of my info there easily. Here is the main arduino page: http://www.arduino.cc/

First thing, get the servo working. Run the servo example code in the arduino programmer to get your feet wet.

Second, download Stephen Hobley's Wii camera library and example code. Here: http://www.stephenhobley.com/arduino/PVision.zip

Connect the arduino to the same pins that he used. Make sure your i2c circuit and clock are all connected and the power is on and then run the code. You may need to insure that the Pvision.h file is in your arduino library so that is it properly reference when compiling.

Once running, in the serial I/O stream in the arduino programmer you should see data coming in as long as the camera sees some IR light.

I first used a match to check the camera. It worked fine. Later I used an IR led since I needed something a little more steady (and less burny.) You can use a digital camera to see if your IR LED's are working. The camera image sensor picks up the IR light that your eyes cannot see. This is a reassuring way to truly know if the LED's are working.
Great work!! you've done a great job explaining details...thanks for that :)
i have one question though,,how is the IR camera calibrated?or what is the x,y reference?the origin (0,0) point
Thanks again,
Aws