When I have my layout uploaded onto my iPod and I run the processing, whenever I move the faders up and down the processing faders on the computer screen don not move with me? Is there something that I am missing ?
thanks
Thanks for the post, would it be possible if you were able to tell me whats wrong with code I have. It's just that I am new with this, and with the code I have I already have the layout etc. Just want to change the RGB colours.
Like I say it work for a couple of seconds, but then just stopped?
Sorry, I thought I would as considering that I still am using the Arduino.
Thats the problem, I have the same IP address on both ipod and mac. But when I run the processing, it comes up with the layout. I get the layout on the ipod but nothing happens. I have tried most things but I still don't know why it wont let me.
String iPadIP = "169.254.84.142"; // change this to the address of your iPad / iPhone
then in setup()
I use.
/* start oscP5, listening for incoming messages at port 8000 */
oscP5 = new OscP5(this,8000);
// set the local IP address and port number to what is on the iPod
myRemoteLocation = new NetAddress(iPadIP,8800); // local IP on the iPod // select the correct page of the TouchOSC layout
OscMessage myMessage = new OscMessage("/2");
oscP5.send(myMessage, myRemoteLocation);
You need to set that string to the IP address of the iPod / pad.
You need to set the host IP address on the iPad to the address of your computer.
String iPadIP = "169.254.84.142"; // change this to the address of your iPad / iPhone
and where abouts do I put
/* start oscP5, listening for incoming messages at port 8000 */
oscP5 = new OscP5(this,8000);
// set the local IP address and port number to what is on the iPod
myRemoteLocation = new NetAddress(iPadIP,8800); // local IP on the iPod // select the correct page of the TouchOSC layout
OscMessage myMessage = new OscMessage("/2");
oscP5.send(myMessage, myRemoteLocation);
I have just tried your code and I added a line to print all the messages from OSC
void oscEvent(OscMessage theOscMessage){
String addr = theOscMessage.addrPattern();
println(addr); // uncomment for debug print of all recieved messages
And I get the correct messages sent. I haven't got the right TouchOSC page so I can only see the messages. Try adding that line as see if you get anything.
Hi, I think I have found out what is wrong with your code. The value returned is a float from 0 to 1, it needs to be multiplied by 255 to work. Change the receiving function to:-
void oscEvent(OscMessage theOscMessage){
String addr = theOscMessage.addrPattern();
println(addr); // uncomment for debug print of all recieved messages
float val = theOscMessage.get(0).floatValue();
if(addr.equals("/1/red")){ redAmount = val*255;}
if(addr.equals("/1/green")){ greenAmount = val*255;}
if(addr.equals("/1/blue")){ blueAmount = val*255;}
}
Thank you very much for the help, I got it all working with the iPod and I even set up the LED. Th colours of the LED change a little, but not to the actual code im inputting. Is this due to the resistor I am using ?
Well we haven't see the code that transfers the numbers to the arduino, nor what the arduino does with it.
That said an LED has a totally different colour gamete than a screen so they won't match.