Go Down

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

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...)

#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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy