DRV8833Motor
MiniOne drive motor of the robot (left_motor or right_motor); speeds are in percent.
How you reach it
Section titled “How you reach it”The DRV8833Motor class is reached through these attributes of robot.
robot.left_motor
Section titled “robot.left_motor”Can be None.
robot.right_motor
Section titled “robot.right_motor”Can be None.
All the attributes of robot are in its table. Read Attributes that can be None to see when a part is None.
Properties
Section titled “Properties”The speed last set, from -100 to 100 percent: negative means backward.
speed: intRead only.
Used in examples: Drive the Mini
inverted
Section titled “inverted”True when this wheel’s wiring is swapped, so forward turns it the other way.
inverted: boolYou can read it and you can set it.
Used in examples: Drive the Mini
Methods
Section titled “Methods”forward(speed)
Section titled “forward(speed)”Turns the wheel forward at a speed from 0 to 100 percent.
forward(speed: int)You can leave out speed.
Used in examples: Drive the Mini
backward(speed)
Section titled “backward(speed)”Turns the wheel backward at a speed from 0 to 100 percent.
backward(speed: int)You can leave out speed.
Used in examples: Drive the Mini
drive(speed)
Section titled “drive(speed)”Turns the wheel at a speed from -100 to 100 percent: positive is forward, negative backward, 0 stops.
drive(speed)Used in examples: Drive the Mini
set_speed(speed)
Section titled “set_speed(speed)”Changes the speed to 0-100 percent and keeps the direction the wheel turns.
set_speed(speed)Used in examples: Drive the Mini
stop()
Section titled “stop()”Lets the wheel roll to a stop (coast).
stop()Used in examples: Drive the Mini
brake()
Section titled “brake()”Stops the wheel at once (active brake).
brake()Used in examples: Drive the Mini