Update servo-test.py
rodzic
877c4fa6b2
commit
9ac4127d33
|
@ -1,15 +1,6 @@
|
|||
from servo import Servo
|
||||
import utime
|
||||
|
||||
servo_pwm_freq = 50
|
||||
min_u16_duty = 1000 - 400 # offset for correction
|
||||
max_u16_duty = 6000 # offset for correction
|
||||
min_angle = 0
|
||||
max_angle = 180
|
||||
current_angle = 0.001
|
||||
|
||||
|
||||
|
||||
pwmPin=15 #change for your pin
|
||||
motor=Servo(pwmPin)
|
||||
|
||||
|
@ -23,4 +14,4 @@ while True:
|
|||
motor.move(135)
|
||||
utime.sleep(1)
|
||||
motor.move(180)
|
||||
utime.sleep(1)
|
||||
utime.sleep(1)
|
||||
|
|
Ładowanie…
Reference in New Issue