MisterT2000:
helloi have numbers in black window of processing when i run these 3 lines but only with this line in arduino IDE:
if(serial.available());but my strip led light in wrong colour, only white with glitter
arduino IDE doesn't like "if(serial.available()>=4);
Your arduino is expecting 4 bytes at a time, the original code you posted was correct. Proofread this part VERY carefully. If "the IDE doesn't like it" and shows an error when you hit "Verify", then proofread it again VERY carefully
//protocol expects data in format of 4 bytes
//(xff) as a marker to ensure proper synchronization always
//followed by red, green, blue bytes
if (Serial.available()>=4) {
if(Serial.read() == 0xff){
red = Serial.read();
green= Serial.read();
blue = Serial.read();
}
}