Wiimote + Processing 3

Hello,

I rediscovered my old Wiimote controller and I am trying to make it work with Processing 3.5.4. I am using a MacbookPro with macOS Catalina.

I already tried out several things but mainly my problem is that the used library doesn’t work anymore with Processing 3.

Approach 1:

  • connect Wiimote simply with bluetooth: working, but not able to actually use the controller

Approach 2:

  • use software to connect Wiimote to mac
  • connection successfully established using DarwiinRemote, but still not able to actually use the controller

Approach 3 (help needed):

This is the library structure I finally implemented successfully:

+ Prossessing
    + libraries
        + Loc
            + library
                - Loc.jar
            + lll
                + Loc
                     - ...
        + wrj4P5
            + library
                - bluecove-2.1.0.jar
                - bluecove-gpl-2.1.0.jar
                - WiiRemoteJ.jar
                - wrj4P5.jar
                - Loc.jar (optional)
            + lll
                + wrj4P5     
                    - ...

  • after the installation I tried out this test code:
import lll.wrj4P5.*;
import lll.Loc.*;

Wrj4P5 wii;

float x, y, w, h;

//Number of IR Emmiters that you want to track
int IREmitters = 4;

void setup() {

  size(512, 384);
  wii=new Wrj4P5(this).connect(Wrj4P5.IR);
}

void draw() { 

  background(0);

  //Draws ir emitters
  for (int i=0; i<IREmitters; i++) {
    Loc p=wii.rimokon.irLights[i];
    if (p.x>-1) {

      // Reads the value sent by the wiimote and multiplicities them by the size of the window
      x=((p.x)*width);
      y=((1.-p.y)*height);
      w=p.z*50;
      h=p.z*100;

      //Prints the values to the console
      print(x);
      print(" ");
      print(y);
      print(" ");
      print(w);
      print(" ");
      println(h);

      //Draws the circles
      noStroke();
      fill(255, 255, 0);
      ellipse(x, y, w, h);

      //Draws the lines
      stroke(255);
      line(x, 0, x, height);
      line(0, y, width, y);

      delay(50);
    }
  }
}
  • but I received the following error in line 14:
NoSuchMethodError: You may be using a library that's incompatible with this version of Processing.
NoSuchMethodError: processing.core.PApplet.registerDispose(Ljava/lang/Object;)V
  • from what I read this probably means the library has to be recompiled to match the current Processing version

Can anybody help me with making the Wiimote work with Processing 3?

Thanks a lot in advance :slight_smile:

Hi Litotitus,

Did you manage to figure out with your problem?

I also have some gadgets from Wii and I want to use them in my processing project. But all documentation about wrj4p5 is old, all examples doesn’t work due to the old libraries. If you find something useful could you write me?

Best regards,

Krauleidys