Arduino serial messaging protocol

@oric_dan: thanks for the remarks, I will add some extra info to the Github page.

About: "the human readable ASCII messages"

We actually send the ASCII values of hex characters between 0 and F (zero and F) (that implies being very inefficient, 240 unused values)
For example:
The packet: "T01N00I12PffQ21"

Would be 15 bytes on the wire (ASCII : HEX)
T: 54
0: 30
1: 31
N: 4E
0: 30
...

The downside:

  • efficiency.
  • it is quite simplistic

The upside is:

  • Easy to parse (easy to see where a message starts and ends)
  • Easy to read (mainly because of the delimiters)
  • No problems with magic number or magic sequences for message headers