-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Currently the Sedani serial reading is handled unsafely and could potentially end up with lost data from serial. This may happen because we only check for the first '$' character, not that the whole message is there. Serial does not guarantee our whole message shows up at once.
This can safely happen with having an terminating character (like a ';' or newline) and then knowing you have a full command. This is the thing to definitely implement.
We may also want to update to a non-blocking method, where we read each character individually to a buffer, but this may be bad as we may be late reading the whole message while other code runs. This may be something to investigate usefulness.
A medium google search says see this link for code: http://forum.arduino.cc/index.php?topic=288234.0