Step 6Computer setup: processing and the wiimote
These instructions are Linux specific, but it should all work on a mac and windows with some research on how to get the wiimote's data into processing.
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. The attached code/sketch just draws a circle where the 1st infra red source is found by the wiimote.
To check your bluetooth, press buttons one and two on the wiimote, then try
$ hcitool scan
at the terminal. You should see the nintendo wiimote detected. If you don't you'll need to look at your bluetooth setup further.
If it's all good, load the wiimote_sensor.pde (attached) program and start it. In the lower status part of the screen you should see:
BlueCove version 2.1.0 on bluez
trying to find a wii
Press buttons 1 and 2 on the wiimote. After it's detected, wave your infra red source (the spray can) around in front of it. You should see a red circle following your movement!
Make sure this works before moving on. If you can't get it to work, search the processing forum.
wiimote_sensor.pde339 bytes| « Previous Step | Download PDFView All Steps | Next Step » |











































Native Library bluecove not available
!! There may be no USB dongle/device. !!
java.lang.IllegalStateException: Bluetooth failed to initialize. There is probably a problem with your local Bluetooth stack or API.
at wiiremotej.WiiRemoteJ.(WiiRemoteJ.java:74)
at lll.wrj4P5.Wrj4P5.connect(Wrj4P5.java:301)
at lll.wrj4P5.Wrj4P5.connect(Wrj4P5.java:290)
at lll.wrj4P5.Wrj4P5.connect(Wrj4P5.java:284)
at lll.wrj4P5.Wrj4P5.connect(Wrj4P5.java:278)
at wiimotetest.setup(wiimotetest.java:30)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.bluetooth.BluetoothStateException: BlueCove library bluecove not available
at com.intel.bluetooth.BlueCoveImpl.loadNativeLibraries(BlueCoveImpl.java:381)
at com.intel.bluetooth.BlueCoveImpl.detectStack(BlueCoveImpl.java:429)
at com.intel.bluetooth.BlueCoveImpl.access$500(BlueCoveImpl.java:65)
at com.intel.bluetooth.BlueCoveImpl$1.run(BlueCoveImpl.java:1020)
at java.security.AccessController.doPrivileged(Native Method)
at com.intel.bluetooth.BlueCoveImpl.detectStackPrivileged(BlueCoveImpl.java:1018)
at com.intel.bluetooth.BlueCoveImpl.getBluetoothStack(BlueCoveImpl.java:1011)
at javax.bluetooth.LocalDevice.getLocalDeviceInstance(LocalDevice.java:75)
at javax.bluetooth.LocalDevice.getLocalDevice(LocalDevice.java:95)
at wiiremotej.WiiRemoteJ.(WiiRemoteJ.java:67)
... 8 more
When I run $ hcitool scan it dows see the wiimote so the dongle is probably not the problem. Any suggestions?
I'd google the phrase:
Caused by: javax.bluetooth.BluetoothStateException: BlueCove library bluecove not available
And try some of the suggestions.
Sorry I can't help more,
Matt