Several LEDs are being driven by Arduino. The LEDs to be lit up are sent to Arduino over serial port. When Arduino receives 12H\n
over serial, it will execute digitalWrite(12, HIGH)
. Then the buffer is flushed. And before executing the write, all other output pins are set to LOW
.
Question: \n
is currently used to indicate the end of a LED pin number for a single pin. How would you label the end of a sequence of LEDs that should be lit up at a time? Eg: 7H 13H 11H\t
? Or 7H,13H,11H\n
? Is there a best practice?
How will you parse it with Arduino?