Skip to content

Search the documentation

Kit
Firmware

DRV8833Motor

Mini

One drive motor of the robot (left_motor or right_motor); speeds are in percent.

The DRV8833Motor class is reached through these attributes of robot.

Can be None.

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.

The speed last set, from -100 to 100 percent: negative means backward.

speed: int

Read only.

Used in examples: Drive the Mini

True when this wheel’s wiring is swapped, so forward turns it the other way.

inverted: bool

You can read it and you can set it.

Used in examples: Drive the Mini

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

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

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

Changes the speed to 0-100 percent and keeps the direction the wheel turns.

set_speed(speed)

Used in examples: Drive the Mini

Lets the wheel roll to a stop (coast).

stop()

Used in examples: Drive the Mini

Stops the wheel at once (active brake).

brake()

Used in examples: Drive the Mini