Inspired by the various wiimote graffiti offerings, but finding no source or instructions (did I not look hard enough?) I decided to do it myself. Here is the first step: getting processing working with the wiimote infrared camera to detect an infrared LED.
After installing processing, I found some instructions on the forum, but I still had some problems. Here is what I had to do:
- install processing
- install bluez libraries: sudo apt-get install bluez-utils libbluetooth-dev
- create ./processing/libraries/Loc and ./processing/libraries/wrj4P5
- download bluecove-2.1.0.jar and bluecove-gpl-2.1.0.jar and put into ./processing/libraries/wrj4P5/library/
- download wiiremoteJ v1.6, and put the .jar into ./processing/libraries/wrj4P5/library/
- download wrj4P5.jar (I used alpha-11) and put into ./processing/libraries/wrj4P5/library/
- download wrj4P5.zip and unzip into ./processing/libraries/wrj4P5/lll/
- download Loc.jar (I used beta-5) and put into ./processing/libraries/Loc/library/
- download Loc.zip and unzip into ./processing/libraries/Loc/lll/
Then I used code inspired from Classiclll to get the buttons and sensor bar working. This code just draws a circle where the 1st infra red source is found by the wiimote:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import lll.wrj4P5.*; import lll.Loc.*; Wrj4P5 wii; void setup() { size(300,300,P2D); wii=new Wrj4P5(this); wii.connect(); } void draw() { background( 0 ); fill( 255 ); Loc p=wii.rimokon.irLights[0]; if (p.x>-1) { ellipse( (1 - p.x)*width, (1.-p.y)*height, 10, 10); } } |
Thanks to the bluecove team, the bluez team, processing crew, Classiclll and all open source massive!
NICE!
I HAVE SOME DIFFICULTIES
WITH DOCUMENTATION AND
TO KNOW WHAT METHODS I CAN USE …
ANY LIGHTS?
BEST!