Go Down

Topic: LED dimmer w/ Processing (Read 646 times) previous topic - next topic

Tesla_pow

Dec 14, 2012, 02:32 pm Last Edit: Dec 14, 2012, 07:00 pm by Tesla_pow Reason: 1
-

fungus


Serial communication sends ASCII-strings


No, serial sends whatever you tell it to.


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.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Tesla_pow

#2
Dec 14, 2012, 04:48 pm Last Edit: Dec 14, 2012, 07:01 pm by Tesla_pow Reason: 1
-

fungus

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.




No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Go Up