#include <Motor.h>
nxpcup::Motor::Motor |
( |
const PinName |
pin0, |
|
|
const PinName |
pin1 |
|
) |
| |
|
inline |
Constructor of class Motor.
- Parameters
-
pin0 | name of the pin for motor driver (require PWM) |
pin0 | name of the pin for motor driver (require PWM) |
nxpcup::Motor::Motor |
( |
const Config & |
config | ) |
|
|
inline |
Constructor of class Motor.
- Parameters
-
int nxpcup::Motor::maxPower |
( |
| ) |
const |
|
inline |
Return the constant maximal power.
int nxpcup::Motor::maxPowerPercent |
( |
| ) |
const |
|
inline |
Return the actual maximal motor power in percent (0 <-> 100).
void nxpcup::Motor::power |
( |
int |
power | ) |
|
|
inline |
Set motor power.
- Parameters
-
power | of the motor (-1000 <-> 1000) under 0 => backward, over 0 => forward, 0 stop |
void nxpcup::Motor::setMaxPowerPercent |
( |
int |
percent | ) |
|
|
inline |
Set the maximal motor power in percent.
- Parameters
-
percent | of the maximal power (0 <-> 100) function power() has still same range |
The documentation for this class was generated from the following file: