LED dimmer w/ Processing

Tesla_pow:
Serial communication sends ASCII-strings

No, serial sends whatever you tell it to.

Tesla_pow:
Seems like I have to attach some kind of identification to my serial redValue and greenValue in the processing sketch but I'm not sure how to do this. Serial communication sends ASCII-strings, but how to incorporate this into different values like red and green?

arduino.write('r'); // Identifier for 'red'
arduino.write(redValue);

Then look for incoming 'r' at the other end.

What are those 'delay(10)' for? Maybe that's too long.

Surely there's a way to wait until serial data is available instead of doing a randomly chosen delay and crossing your fingers.