I am trying to send from max msp some values. I have no problem in receiving them however, when I try to send multiple values at one I have some troubles. Is there a way to get multiple values?
using the code below I am getting :
> pixelNum: 10 pixelState: 0 pixelNum: 1 pixelState: 0
void loop() {
OSCMessage msgIN;
int size;
if((size = Udp.parsePacket())>0){
while(size--)
msgIN.fill(Udp.read());
if(!msgIN.hasError()){
msgIN.route("/pixelAni",pixelAni);
}
}
}
void pixelAni(OSCMessage &msg, int addrOffset){
int pixelNum = msg.getInt(0);
int pixelState = msg.getInt(1);
Serial.println("pixelNum: ");
Serial.println(pixelNum);
Serial.println("pixelState: ");
Serial.println(pixelState);
pixels[pixelNum].R = 255;
pixels[pixelNum].G = 255;
pixels[pixelNum].B = 255;
ledstrip.show(pixels);
}