Skip to content

Commit ed1a8fc

Browse files
committed
Merge branch 'banish-time-sleep'
2 parents 92e1e34 + 39a19a7 commit ed1a8fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

programming/motors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Therefore to stop your motors you must explicitly set the power output to zero:
8383
~~~~~ python
8484
# Put motor board srABC1, channel 1 at 25% power for 2.5 seconds:
8585
robot.motor_boards["srABC1"].motors[1].power = 0.25
86-
time.sleep(2.5) # wait for 2.5 seconds
86+
robot.sleep(2.5) # wait for 2.5 seconds
8787
robot.motor_boards["srABC1"].motors[1].power = 0
8888
~~~~~
8989

@@ -97,7 +97,7 @@ robot.motor_boards["srABC1"].motors[0].power = 1
9797
robot.motor_boards["srABC1"].motors[1].power = -1
9898

9999
# Wait a while for the robot to move
100-
time.sleep(3)
100+
robot.sleep(3)
101101

102102
# Stop both motors
103103
robot.motor_boards["srABC1"].motors[0].power = 0

0 commit comments

Comments
 (0)