HexArth Product Information Retrieval
From Waveshare Wiki
Robot Product Information Retrieval
In HexArth_Web Usage, it introduces how to control robot motion via the Web interface, including joint motion control and self-balancing control.
This tutorial explains the specific meanings of JSON commands for retrieving robot product information. It mainly covers OLED screen settings, IMU data retrieval, chassis information feedback, and LED linear control.
CMD_OLED_CTRL - OLED Screen Control
{"T":13,"lineNum":0,"Text":"putYourTextHere"}
- 13: Indicates this command is CMD_OLED_CTRL, which displays the given text on the corresponding line of the OLED.
- lineNum: The corresponding line number. Value range: 0 ~ 3.
- Text: The text to be displayed.
CMD_OLED_DEFAULT-OLED Screen Reset
{"T":-3}
- -3: Indicates this command is CMD_OLED_DEFAULT, which resets the OLED screen to its initial state, displaying robot information.
CMD_GET_IMU_DATA - Get IMU Data
{"T":126}
- Used to obtain the IMU's 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 - Serial Continuous 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 query-response is enabled, chassis information feedback is obtained through the query-response method, using commands like CMD_CLAWS_FEEDBACK above to get chassis information.
- When continuous feedback is enabled, the chassis continuously sends feedback information without the host needing to send query commands. This mode 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.