Serial Protocol
Last updated
Was this helpful?
Last updated
Was this helpful?
We have defined a set of serial communication protocols for robots:
All the token starts with a single ASCII-encoded character to specify their parsing format. They are case-sensitive and usually in lowercase.
Try the following serial commands in the serial monitor:
“ksit”
“m0 30”
“m0 -30”
“kbalance”
“kwkF”
“ktrL”
“d”
The quotation mark indicates that they are character strings. Don’t type quotation marks in the serial monitor.
You can refer to the macro definitions in OpenCat.h to utilize the most updated sets of tokens.
Some more available commands for skills:
The complete set of skills in effect is defined in InstinctBittle.h or InstinctNybble.h: For example:
All the skill names in the list can be called by adding a 'k' to the front and deleting the suffix. For example, there's "sitI" in the list. You can send "ksit" to call the sitting posture. If a skill has "F" or "L" as the second last character, it's a gait. It means walking forward or left. Walking right is a mirror of walking left. So you can send "kwkF", "kwkL", "kwkR" to make the robot walk. Similarly, there are other gaits like trot ("tr"), crawl ("cr"), and stepping ("vt").