Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • why are using JSON? ..... why don't you simply use single byte commands with single byte data such as, for example L10 or L:1:0 which could mean LED 1 off ? Commented Dec 26, 2018 at 20:45
  • 1
    majenko.co.uk/blog/reading-serial-arduino Commented Dec 27, 2018 at 0:38
  • 1
    For any communication you have to indicate your packet end somehow. You can use termination character ot fixed data length. And you have to read data from serial port on Arduino side until receive the termination character ot reach the packet length. Commented Dec 27, 2018 at 4:02
  • timeout is not applied for available() and read() that is why your code stops reading at a gap in data flow. are the coming in until you blink the LED 3 seconds? then you loose data there Commented Jan 3, 2019 at 19:06