Skip to content

Commit 54054a8

Browse files
committed
First commit of servo_motor_init() and servo_motor_rotate_by_degree() API
1 parent 0972daa commit 54054a8

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

test.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,16 @@
7979

8080
# Servo Motor
8181
# case 11) Rotate servo motor forth and back with speed 50% during 5s and stop
82-
n.servo_motor_rotate('out2', 'forward', '50')
83-
wait(2000)
84-
n.servo_motor_rotate('out2', 'forward', '0')
85-
wait(1000)
86-
n.servo_motor_rotate('out2', 'backward', '50')
87-
wait(2000)
88-
n.servo_motor_rotate('out2', 'forward', '0')
89-
wait(1000)
82+
# n.servo_motor_rotate('out2', 'forward', '50')
83+
# wait(2000)
84+
# n.servo_motor_rotate('out2', 'forward', '0')
85+
# wait(1000)
86+
# n.servo_motor_rotate('out2', 'backward', '50')
87+
# wait(2000)
88+
# n.servo_motor_rotate('out2', 'forward', '0')
89+
# wait(1000)
90+
91+
# case 12) Rotate servo motor forward by 120 degrees at 50% speed within 3 seconds
92+
n.servo_motor_init('out1')
93+
n.servo_motor_rotate_by_degree('out1', 'forward', '50', '120')
94+
wait(3000)

0 commit comments

Comments
 (0)