Welcome to DOGZILLA-Lite repository
11. Read the servo angle
Reading of servo angle
1. Purpose of the experiment
Realize the reading of the servo angle.
2. Experimental path source code
Enter the dog's system, end the dog program, enter "ip (ip is the dog's ip): 8888" in the browser, enter the password "yahboom"
and log in to the path of cd ~/DOGZILLA_Lite_class/2.Base Control/11.Read Servo and run Read Servo.ipynb .
3. Experimental Phenomenon
After running the code, you can print out all the current servo angles of the dog

4. Main source code analysis
while True: print(dog.read_motor()) time.sleep(1)Through the API interface, read the underlying IMU data and print it out.
read_motor() reads the angles of 15 servos. If the reading is successful, it returns a list of 15, corresponding to the servo angles numbered [11,12,13,21,22,23,31,32,33,41,42,43,51,52,53]. If the reading fails, it returns an empty list.
The servo ID number is located at the dog's position as shown in the figure:
