STEMBoT 2 User’s Manual
========================================================================
(Class) -
Motor(x)
- Used for interacting with the motors. Accepts either 1 or 2 as a
parameter.
(Method) -
sleep(bool)
- Forces the associated motor to enter or exit sleep
mode. True sets the motor to sleep and False wakes it up. Leaving the parameter
blank returns either True or False depending on the sleep state.
(Method) -
brake_mode(bool)
- Sets the motor brake mode. If true, the motor
will “brake” at the end of movement, otherwise the motor will be allowed to roll.
Leaving the parenthesis blank will return either True or False depending on the
state of the brake mode.
(Method) -
speed(x)
- Sets the stepper motor to move continuously. Values
above 500 may cause the motor to stall. Leaving the parenthesis blank will return
the current speed.
(Method) -
distance(steps, speed, acceleration, blocking)
- Causes the motor
shaft to rotate a given number of steps at a certain speed. Speeds above 500
may cause the motor to stall. Acceleration is the time it takes to wind up to the
given speed (a value of 10 is recommended for most purposes). Setting blocking
to True prevents the next line of code from being executed until the motor
finishes moving.
(Method) -
stop()
- Causes the motor to stop moving.
(Function) -
setWheelDiameter(x)
- Sets the wheel diameter in millimeters. This value is
used for distance conversions. Default is 85.
(Function) -
getWheelDiameter()
- Returns the current wheel diameter in millimeters.
(Function) -
inches_to_steps(x)
- Converts the given number of inches to steps based
on the wheel’s diameter. Used for the distance() method.
(Function) -
mm_to_steps(x)
- Converts the given number of millimeters to steps based
on the wheel’s diameter. Used for the distance() method.
(Function -
decirevs_to_steps(x)
- Converts the given number of decirevs to steps.
Used for the distance() method.
(Function) -
steps_to_inches(x)
- Converts a given number of steps to inches based on
the wheel’s diameter.
(Function) -
steps_to_mm(x)
- Converts the given number of steps to millimeters based
on the wheel’s diameter.
(Function) -
steps_to_decirevs(x)
- Converts the given number of steps to decirevs.
(Class) -
Servo(x)
- Used for programming the servo ports.
(Method) -
pulse_width(x)
- Sets the pulse width of the servo signal to the given
number of microseconds
(Module) -
remote
(Class) -
Remote()
- Used to access remote controller methods
(Method) -
pair()
- Pairs the SB2 with a remote controler
========================================================================
Revision 1.1.0 : January 2021
Summary of Contents for STEMBoT 2
Page 1: ...User s Manual Rev 1 1 0 ...