Skip to content

Commit bd50b4a

Browse files
committed
Move stop motor example out of tutorial directory
1 parent 6699afb commit bd50b4a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/usr/bin/python3
1+
#!/usr/bin/env python3
2+
"""NXT-Python example to use thread to stop a motor."""
23
import threading
34
import time
45

@@ -7,9 +8,9 @@
78

89
with nxt.locator.find() as b:
910
# Get the motor connected to the port A.
10-
mymotor: nxt.motor.BaseMotor = b.get_motor(nxt.motor.Port.A)
11+
mymotor = b.get_motor(nxt.motor.Port.A)
1112

12-
stop_motor = False # controls wether the motor should stop turning
13+
stop_motor = False # controls whether the motor should stop turning
1314

1415
# create thread that turns the motor
1516
t = threading.Thread(

0 commit comments

Comments
 (0)