Petoi Doc Center
🇺🇸English
Search…
⌃K

Serial Protocol

We have defined a set of serial communication protocols for robots:
All the token starts with a single Ascii encoded character to specify its parsing format. They are case-sensitive and usually in lower case.
Some commands, like the c and m commands can be combined.
For example:
Successive "m8 40", "m8 -35", "m 0 50" can be written as "m8 40 8 -35 0 50". You can combine up to four commands of the same type. To be exact, the length of the string should be smaller than 30 characters. You can change the limit in the code but there might be a systematic constraint for the serial buffer.
Try the following serial commands in the serial monitor:
  • ksit”
  • m0 30”
  • m0 -30”
  • kbalance”
  • kwkF”
  • ktrL”
  • d
The quotation mark just indicates that they are character strings. Don’t type quotation marks in the serial monitor.
Some more available commands: