Announcement

Collapse
No announcement yet.

Wii + Osculator + Processing communication

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wii + Osculator + Processing communication



    Hi,


    I am trying to set up a connection between wii and processing through osculator. osculator is immediately recognizing wii controller, but processing could not receive those messages. I guess there is a problem with OSculator configuration settings I am choosing but I probably tried all combinations. The pitch method does not even print a word.

    here is the code piece.


    Code:
    import oscP5.*;
    
    import netP5.*;
    
    
    OscP5 osc;
    
    
    float[] pitchDraw;
    
    float[] rollDraw;
    
    float[] yawDraw;
    
    
    void setup() {
    
    
      size(400, 400);
    
      osc = new OscP5(this,8000);
    
      osc.plug(this,"pry","/wii/1/accel/pry");
    
      osc.plug(this,"pitch","/wii/1/accel/pry/0");
    
    
      background(255);
    
      smooth();
    
      noFill();
    
      stroke(0);
    
    
      // Drawing Wii values
    
      pitchDraw = new float[width];
    
      rollDraw = new float[width];
    
      yawDraw = new float[width];
    
    }
    
    
    float pitch;
    
    float roll;
    
    float yaw;
    
    
    void pry(float _pitch, float _roll, float _yaw, float _accel) {
    
      pitch = _pitch;
    
      roll = _roll;
    
      yaw = _yaw;
    
    }
    
    
    void pitch(float _pitch){
    
      pitch = _pitch;
    
      print("pitch "+pitch);
    
    }
    
    
    void draw(){
    
    
    }

    and here is the osculator configuration screen




    Thank you


  • #2


    Are you running Processing on the same machine ?

    If yes, you should choose a different input port than 8000 since it is already used by OSCulator.


    From your screenshot it seems you are not forwarding data to the same computer, is that intended ?

    A last detail : when you forward the whole message (/wii/1/accel/pry), there is no need to route any of the arguments since they are routed along with the message.


    Best,

    Cam

    Comment


    • #3


      Hi Camille,


      Thank you very much for your help. No, it was not what I intended. I thought that the name macbook09.. corresponds to my machine, but in fact it was not. I corrected this with the localhost:9000 and also change the port name in the processing code as 9000. I only routed the pry msg now I am able read the wii data. Thank you again for helping me to pass this very basic step : )


      Cheers, Pros

      Comment

      Working...
      X