User Manual
Table Of Contents
- 1. Premise
- 2. Raspberry Pi System Installation and Developmen
- 3 Log In to The Raspberry Pi and Install The App
- 4 Raspberry Pi Structure Assembly and Precautions
- 5 Controlling A Robot via WEB App
- 6 Common Problems and Solutions(Q&A)
- 7 Set The Program to Start Automatically
- 8 Remote Operation of Raspberry Pi Via MobaXterm
- 9 How to Control WS2812 RGB LED
- 10 How to Control The Servo
- 11 Calling the API to Control the Robot
- 12 Automatic Stabilization Function
- 13 Gait Generation Method of A Hexapod Robot
- 14 Make A Police Light or Breathing Light
- 15 Real-Time Video Transmission
- 16 Why OpenCV Uses Multi-threading to Process Vide
- 17 OpenCV Learn to Use OpenCV
- 18 Using OpenCV to Realize Color Recognition and T
- 19 Machine Line Tracking Based on OpenCV
- 20 Create A WiFi Hotspot on The Raspberry Pi
- 21 Install GUI Dependent Item under Window
- 22 How to Use GUI
- 23 Enable UART
- 24 Control Your Adeept_RaspClaws with An Android D
- Conclusion
71
init_pwm7 = 300
init_pwm8 = 300
init_pwm9 = 300
init_pwm10 = 300
init_pwm11 = 300
init_pwm12 = 300
init_pwm13 = 300
init_pwm14 = 300
init_pwm15 = 300
●The code responsible for initialization is in move.py, call the initial value init_pwm in RPIservo.py through
exec, use the for loop to take out all the initial values and assign it to pwm0, pwm1... variables:
for i in range(0,16):
exec('pwm%d=RPIservo.init_pwm%d'%(i,i))
def init_all():
pwm.set_pwm(0, 0, pwm0)
pwm.set_pwm(1, 0, pwm1)
pwm.set_pwm(2, 0, pwm2)
pwm.set_pwm(3, 0, pwm3)
pwm.set_pwm(4, 0, pwm4)
pwm.set_pwm(5, 0, pwm5)
pwm.set_pwm(6, 0, pwm6)
pwm.set_pwm(7, 0, pwm7)
pwm.set_pwm(8, 0, pwm8)
pwm.set_pwm(9, 0, pwm9)
pwm.set_pwm(10, 0, pwm10)
pwm.set_pwm(11, 0, pwm11)
pwm.set_pwm(12, 0, pwm12)
pwm.set_pwm(13, 0, pwm13)
pwm.set_pwm(14, 0, pwm14)
pwm.set_pwm(15, 0, pwm15)
init_all()
● In webserver.py, the robotCtrl() function is used to control the robot to move forward, backward, turn
left, turn right, and rotate the two-degree-of-freedom camera platform: