We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6699afb commit bd50b4aCopy full SHA for bd50b4a
1 file changed
examples/tutorial/stop_turning_motor.py examples/stop_turning_motor.pyexamples/tutorial/stop_turning_motor.py renamed to examples/stop_turning_motor.py
@@ -1,4 +1,5 @@
1
-#!/usr/bin/python3
+#!/usr/bin/env python3
2
+"""NXT-Python example to use thread to stop a motor."""
3
import threading
4
import time
5
@@ -7,9 +8,9 @@
7
8
9
with nxt.locator.find() as b:
10
# Get the motor connected to the port A.
- mymotor: nxt.motor.BaseMotor = b.get_motor(nxt.motor.Port.A)
11
+ mymotor = b.get_motor(nxt.motor.Port.A)
12
- stop_motor = False # controls wether the motor should stop turning
13
+ stop_motor = False # controls whether the motor should stop turning
14
15
# create thread that turns the motor
16
t = threading.Thread(
0 commit comments