Processing doesn't receive from TouchOSC
in
Integration and Hardware
•
1 year ago
Hello, I'm an Italian student !
I'm developing some little and simple projects for a communication between the Arduino and the ipod Touc.
I've correctly downloaded a touchOSCEditor layout on my ipod with a pushbutton called "OFF", then i tried this code on Processing:
Could anyone help me ?
I'm an Ubuntu 11.04 user
I'm developing some little and simple projects for a communication between the Arduino and the ipod Touc.
I've correctly downloaded a touchOSCEditor layout on my ipod with a pushbutton called "OFF", then i tried this code on Processing:
- import oscP5.*;
import netP5.*;
import processing.serial.*;
Serial arduino;
OscP5 oscP5;
void setup() {
oscP5 = new OscP5(this,8000);
arduino = new Serial(this,"/dev/ttyUSB0", 9600);
}
void oscEvent(OscMessage theOscMessage) {
String addr = theOscMessage.addrPattern();
if(addr.indexOf("/OFF") != 0){
arduino.write("");
}
else{
arduino.write("-");
}
}
void draw{}
Could anyone help me ?
I'm an Ubuntu 11.04 user
1