There should be no change to these tests for existing PYBV1x and PYBD_SFx boards. Signed-off-by: Damien George <damien@micropython.org>
21 lines
324 B
Python
21 lines
324 B
Python
try:
|
|
from pyb import Servo
|
|
except ImportError:
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
servo = Servo(1)
|
|
print(servo)
|
|
|
|
servo.angle(0)
|
|
servo.angle(10, 100)
|
|
|
|
servo.speed(-10)
|
|
servo.speed(10, 100)
|
|
|
|
servo.pulse_width(1500)
|
|
print(servo.pulse_width())
|
|
|
|
servo.calibration(630, 2410, 1490, 2460, 2190)
|
|
print(servo.calibration())
|