How to read and save the state of digital input using arm.get_cgpio_digital()

i want to control the robot using 6 digital switches connected to the xarm6 controller at CI0 to CI6 mapping those switches to pitch+, Pitch-, roll+, roll- and yaw+ and yaw-

Dear friend,

You can use get_cgpio_digital the get the value of the IO, judge if the IO has changed, if yes control RPY via set_position/set_servo_angle method. We provide a relative parameter to do relative motion.

Below is a simple demo just for your reference, CI1 mapping x+10, CI2 mapping y+10.


Best regards,
Minna