Go Down

Topic: processing+iphone+touchosc= arduino controlled by iphone!:) (Read 886 times) previous topic - next topic


i dont know, what was wrong with this code!:(
import oscP5.*;
import netP5.*;

OscP5 oscP5;
float redAmount = 0.0f;
float greenAmount = 0.0f;
float blueAmount = 0.0f;

void setup(){
  oscP5 = new OscP5(this, 8000);
void draw(){
   background(redAmount, greenAmount, blueAmount);

void oscEvent(OscMessage theOscMessage){
  String addr = theOscMessage.addrPattern();
  float val = theOscMessage.get(0).floatValue();
  if(addr.equals("/1/red")){ redAmount = val;}
  if(addr.equals("/1/green")){ greenAmount = val;}
  if(addr.equals("/1/blue")){ blueAmount = val;}


help me please


May 18, 2012, 11:02 pm Last Edit: May 18, 2012, 11:05 pm by AWOL Reason: 1
Neither do I, except it is badly posted.
Please use code tags.
And lose the poll
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

Go Up