Control all servo

1. API Introduction

Arm_serial_servo_write6(S1, S2, S3, S4, S5, S6, time)

Function: Simultaneously control the angle to which the six servos of the robotic arm are to move.

Parameter explanation:

S1: Angle value of No. 1 servo 0~180.

S2: The angle value of No. 2 servo is 0~180.

S3: The angle value of No. 3 servo is 0~180.

S4: The angle value of No. 4 servo is 0~180.

S5: The angle value of servo No. 5 is 0~270.

S6: The angle value of servo No. 6 is 0~180.

Time: Controls the time the servo runs. Within the valid range, the servo rotates at the same angle. The smaller the input running time, the faster the servo moves. Entering 0 will cause the servo to run at the fastest speed.

Return value: None.

 

2. Code

Code path: /home/jetson/Dofbot/3.ctrl_Arm/5.ctrl_all.ipynb

Open the program file from jupyter lab and click the Run Entire Notebook button on the jupyter lab toolbar.

You can see that the six servos of the robotic arm rotate at the same time, and the robotic arm continuously changes its posture.

Click the Stop button on the toolbar to exit.