Arduino USB serial input
1 minute read
Arduino USB serial input
Originally I was going to try use JSON coming from a API developer perspective but there doesn’t seem to be much adoption of that for serial comms.
One of the few posts I found discussing JSON at the time (2019 odd as I sat on this post): Sending JSON over serial in Python to Arduino
In the end I decided KISS (Keep It Simple S…) and used comma separated values.
setcustom, 255, 255, 0
Return a ack/OK if all is good.
See the example: open-fusion-led-controller-arduino.ino#lines-214
The other option is new line (\n
) only but you are limited to commands with no key value pairs e.g. reboot
Also see
- My blog pots on: .NET Framework Win Form OFLC serial client
- OFLC serial API documentation: Arduino USB serial API
I feedback.
Let me know what you think of this article on twitter @M3PGS or leave a comment below!
Let me know what you think of this article on twitter @M3PGS or leave a comment below!
comments powered by Disqus