linux ubuntu 8.10 + processing + wiimote + wrj4P5 = virtual graffiti!

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:

  1. install processing
  2. install bluez libraries: sudo apt-get install bluez-utils libbluetooth-dev
  3. create ./processing/libraries/Loc and ./processing/libraries/wrj4P5
  4. download bluecove-2.1.0.jar and bluecove-gpl-2.1.0.jar and put into ./processing/libraries/wrj4P5/library/
  5. download wiiremoteJ v1.6, and put the .jar into ./processing/libraries/wrj4P5/library/
  6. download wrj4P5.jar (I used alpha-11) and put into ./processing/libraries/wrj4P5/library/
  7. download wrj4P5.zip and unzip into ./processing/libraries/wrj4P5/lll/
  8. download Loc.jar (I used beta-5) and put into ./processing/libraries/Loc/library/
  9. 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!

2 thoughts on “linux ubuntu 8.10 + processing + wiimote + wrj4P5 = virtual graffiti!

Leave a Reply

Your email address will not be published. Required fields are marked *