Catalogue:
Set up LED lights
-
Parameters
-
mode – 1 - Set LED light color. 2 - Set the LED light to blink.
-
R – (int) 0 ~ 255
-
G – (int) 0 ~ 255
-
B – (int) 0 ~ 255
-
Get firmware version number
Get the total current of the motor
Read battery information
- Return
list : [battery_data, battery_1_voltage, battery_2_voltage].
battery_data
:A string of length 6, represented from left to right: bit5, bit4, bit3, bit2, bit1, bit0. bit5 : Battery 2 is inserted into the interface 1 means inserted, 0 is not inserted. bit4 : Battery 1 is inserted into the interface, 1 means inserted, 0 is not inserted. bit3 : The adapter is plugged into the interface 1 means plugged in, 0 not plugged in. bit2 : The charging pile is inserted into the interface, 1 means plugged in, 0 is not plugged in. bit1 : Battery 2 charging light 0 means off, 1 means on. bit0 : Battery 1 charging light, 0 means off, 1 means on.battery_1_voltage
: Battery 1 voltage in volts.battery_2_voltage
: Battery 2 voltage in volts.
Control the car to move forward
-
Parameters
- go_speed – (int) 1 ~ 127 is forward.The smaller the value, the smaller the speed
Control the car back
-
Parameters
- back_speed – (int) 1 ~ 127 is backward.The smaller the value, the smaller the speed
Control the car to pan to the left
-
Parameters
- pan_left_speed – (int) 1 ~ 127.The smaller the value, the smaller the speed
Control the car to pan to the right
-
Parameters
- pan_right_speed – (int) 1 ~ 127.The smaller the value, the smaller the speed
Control the car to rotate clockwise
-
Parameters
- rotate_right_speed – (int) 1 ~ 127.The smaller the value, the smaller the speed
Control the car to rotate counterclockwise
-
Parameters
- rotate_left_speed – (int) 1 ~ 127.The smaller the value, the smaller the speed
stop motion.
Motor stall recovery