We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm new in this world, and I'd know how to send a numerial variable Processing-->Arduino (not Arduino-->Processing!!).
I've got the programme for send only a letter, but i don't know hoy to send a number (0-100).
Thanks!
Answers
I would just send the number as a String followed by a delimiter. Then on the arduino-side you can reconstruct the number from the characters that you receive.
Here is an example-code for processing that sends random numbers when you click a mouse-button:
And here is the counter-part for the arduino, that reads the incoming serial-data and writes the number back to the serial-port when a delimiter is received:
I hope that helps to understand the principle.
If you only have a single value to send, you could as well just send a single byte. Would be easier on the arduino-side. Just saw this thread with an example code: https://forum.processing.org/two/discussion/14006/example-code-controlling-electric-motors-with-a-controlp5-knob-and-adafruit-motor-shield-boards#latest
Thank you, you have fixed my problem!! Now I have another one, but I'll write a new discussion :D