Skip to content

Commit 0259e95

Browse files
author
Chris Anderson
authored
Revised for new Adafruit Micropython library
1 parent 1113d3e commit 0259e95

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

examples/RobotTest.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Simple two DC motor robot class usage example.
2-
# Author: Tony DiCola
2+
# Author: Tony DiCola, Chris Anderron
33
# License: MIT License https://opensource.org/licenses/MIT
44
import time
55

@@ -23,16 +23,13 @@
2323

2424

2525
# 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+
3027
robot = Robot.Robot(left_trim=LEFT_TRIM, right_trim=RIGHT_TRIM)
3128

3229
# Now move the robot around!
3330
# 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
3633
# to get enough torque to move the robot.
3734
# - time (seconds): Amount of time to perform the movement. After moving for
3835
# this amount of seconds the robot will stop. This parameter

0 commit comments

Comments
 (0)