HexArth Product Information Acquisition
Robot Product Information Acquisition
This tutorial explains in detail the meanings of JSON commands related to robot product information acquisition, covering OLED screen settings, IMU data acquisition, chassis information feedback, and LED linear control.
CMD_OLED_CTRL - OLED Screen Control
{ "T": 13, "lineNum": 0, "Text": "putYourTextHere" }
13: Indicates that this command isCMD_OLED_CTRL, which displays the text on the corresponding line of the OLED.lineNum: 0~3, specifies the display line.Text: The text to be displayed.
CMD_OLED_DEFAULT - Restore OLED Screen
{"T":-3}
-3: Indicates that this command isCMD_OLED_DEFAULT, which resets the OLED screen to its initial state, displaying the robot's information.
CMD_GET_IMU_DATA - Get IMU Data
{"T":126}
- Used to obtain the IMU quaternion and raw data for each axis.
CMD_CLAWS_FEEDBACK - Get Chassis Information Feedback
{"T":130}
- Used to obtain IMU data and real-time voltage.
CMD_INFO_PRINT - Continuous Serial Feedback
// Turn off all feedback
{"T":605,"cmd":0}
// Enable query-response mechanism (default)
{"T":605,"cmd":1}
// Enable continuous feedback
{"T":605,"cmd":2}
- When question-answer mode is enabled, chassis information feedback is obtained through a question-answer mechanism, using commands like
CMD_CLAWS_FEEDBACKabove to get chassis information. - When this function is enabled, the chassis will continuously send feedback without requiring host commands. This is suitable for ROS systems.
CMD_LED_CTRL - IO4 and IO5 Control
{ "T": 132, "IO4": 255, "IO5": 255 }
- Used to set the PWM for IO4 and IO5.