Serial Write - print more than one byte?

https://processing.org/reference/libraries/serial/Serial_write_.html

If you are sending strings it needs to be double quotes.

Stick to single characters for now until you can handle a string at the receiving end (Arduino).

port.write("LED"); //sends ASCII characters for 'L', 'E' and 'D'.
port.write('\r'); //send an ASCII character 10 (value)
// port.write(13); // same as port.write('\r');

You will have to send a delimiter (terminating character) such as ‘\r’ after to indicate where the string ends and check for this on Arduino side.

Sorry about edits… intermittent fasting today and should not be sending posts.

:slight_smile:

1 Like