Communication Protocol - ab-10/WSROV GitHub Wiki

When sending commands to and receiving data from the robot, we use a specific communications protocol, specifying the order in which characters are sent and should be expected.

Main Communication

Commands sent from the main computer follow the format shown above. Header consists of two identical characters, varying depending on the type of information being sent. Space for information contains the core data being sent and footer contains end byte, which is always single 'E' character.

Headers

There are three types of headers that can be sent from Main:

  • 'T' followed by PWM values for all thrusters in microseconds
  • 'S' followed by two 'h' characters for humidity or two 't' characters for temperature, requests the respective sensor readings.
  • 'A' followed by two 'm' or 's' characters, pings Master or Slave respectively.

Master Communication

Master Arduino responds to the commands sent from Main with information containing the core data of varying length and a footer, which is always a newline character.