One motor port on the DRV8833 motor controller.
More...
#include <DRV8833.h>
One motor port on the DRV8833 motor controller.
◆ Direction
Motor turning direction.
| Enumerator |
|---|
| Clockwise | |
| CounterClockwise | |
◆ Type
Basic Thing types.
| Enumerator |
|---|
| Undetermined | |
| Switch | |
| DistanceSensor | |
| ControlledMotor | |
| UncontrolledMotor | |
◆ DRV8833Motor() [1/2]
| DRV8833Motor::DRV8833Motor |
( |
| ) |
|
◆ DRV8833Motor() [2/2]
Setup the DC motor.
- Parameters
-
| pinIn1 | the pin number for the in1 signal |
| pinIn2 | the pin number for the in2 signal |
| direction | the forward turning direction of the motor |
◆ SetSpeed()
| void DRV8833Motor::SetSpeed |
( |
float |
speed | ) |
|
|
overridevirtual |
Set the motor speed.
- Parameters
-
| speed | Speed between -1 (full reverse), 0 (stop) and 1 (full forward) |
Reimplemented from Passer::RoboidControl::Motor.
◆ GetSpeed()
| float Motor::GetSpeed |
( |
| ) |
|
|
virtualinherited |
Get the current target speed of the motor.
- Returns
- The speed between -1 (full backward), 0 (stop) and 1 (full forward)
◆ IsMotor()
◆ IsSensor()
◆ pinIn1
| byte Passer::RoboidControl::DRV8833Motor::pinIn1 = 0 |
|
protected |
The pin number for the in1 signal.
◆ pinIn2
| byte Passer::RoboidControl::DRV8833Motor::pinIn2 = 0 |
|
protected |
The pin number for the in2 signal.
◆ direction
The forward turning direction of the motor.
◆ currentTargetSpeed
| float Passer::RoboidControl::Motor::currentTargetSpeed = 0 |
|
protectedinherited |
◆ type
| unsigned int Passer::RoboidControl::Thing::type |
|
inherited |
◆ SwitchType
◆ DistanceSensorType
| const unsigned int Thing::DistanceSensorType |
|
staticinherited |
Initial value:=
static const unsigned int SensorType
Bitmap for Sensor type.
Definition Thing.h:31
◆ ControlledMotorType
| const unsigned int Thing::ControlledMotorType |
|
staticinherited |
Initial value:=
static const unsigned int MotorType
Bitmask for Motor type.
Definition Thing.h:29
◆ UncontrolledMotorType
| const unsigned int Thing::UncontrolledMotorType |
|
staticinherited |
◆ MotorType
| const unsigned int Passer::RoboidControl::Thing::MotorType = 0x8000 |
|
staticprotectedinherited |
◆ SensorType
| const unsigned int Passer::RoboidControl::Thing::SensorType = 0x4000 |
|
staticprotectedinherited |
The documentation for this class was generated from the following files: