File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
1
# Simple two DC motor robot class usage example.
2
- # Author: Tony DiCola
2
+ # Author: Tony DiCola, Chris Anderron
3
3
# License: MIT License https://opensource.org/licenses/MIT
4
4
import time
5
5
23
23
24
24
25
25
# Create an instance of the robot with the specified trim values.
26
- # Not shown are other optional parameters:
27
- # - addr: The I2C address of the motor HAT, default is 0x60.
28
- # - left_id: The ID of the left motor, default is 1.
29
- # - right_id: The ID of the right motor, default is 2.
26
+
30
27
robot = Robot .Robot (left_trim = LEFT_TRIM , right_trim = RIGHT_TRIM )
31
28
32
29
# Now move the robot around!
33
30
# Each call below takes two parameters:
34
- # - speed: The speed of the movement, a value from 0-255 . The higher the value
35
- # the faster the movement. You need to start with a value around 100
31
+ # - speed: The speed of the movement, a value from -1-1 . The higher the value
32
+ # the faster the movement. You need to start with a value around 10
36
33
# to get enough torque to move the robot.
37
34
# - time (seconds): Amount of time to perform the movement. After moving for
38
35
# this amount of seconds the robot will stop. This parameter
You can’t perform that action at this time.
0 commit comments