Exploring BeagleBone
V1.0
|
A generic DC motor class that controls a motor driver board using a PWM signal,and a GPIO state to control the motor direction. More...
#include <DCMotor.h>
Public Types | |
enum | DIRECTION { CLOCKWISE, ANTICLOCKWISE } |
Public Member Functions | |
DCMotor (PWM *pwm, GPIO *gpio) | |
DCMotor (PWM *pwm, int gpioNumber) | |
DCMotor (PWM *pwm, GPIO *gpio, DCMotor::DIRECTION direction) | |
DCMotor (PWM *pwm, int gpioNumber, DCMotor::DIRECTION direction) | |
DCMotor (PWM *pwm, GPIO *gpio, DCMotor::DIRECTION direction, float speedPercent) | |
DCMotor (PWM *pwm, int gpioNumber, DCMotor::DIRECTION direction, float speedPercent) | |
virtual void | go () |
virtual void | setSpeedPercent (float speedPercent) |
virtual float | getSpeedPercent () |
virtual void | setDirection (DIRECTION direction) |
virtual DIRECTION | getDirection () |
virtual void | reverseDirection () |
virtual void | stop () |
virtual void | setDutyCyclePeriod (unsigned int period_ns) |
virtual | ~DCMotor () |
A generic DC motor class that controls a motor driver board using a PWM signal,and a GPIO state to control the motor direction.
exploringBB::DCMotor::DCMotor | ( | PWM * | pwm, |
int | gpioNumber | ||
) |
exploringBB::DCMotor::DCMotor | ( | PWM * | pwm, |
GPIO * | gpio, | ||
DCMotor::DIRECTION | direction | ||
) |
exploringBB::DCMotor::DCMotor | ( | PWM * | pwm, |
int | gpioNumber, | ||
DCMotor::DIRECTION | direction | ||
) |
exploringBB::DCMotor::DCMotor | ( | PWM * | pwm, |
GPIO * | gpio, | ||
DCMotor::DIRECTION | direction, | ||
float | speedPercent | ||
) |
exploringBB::DCMotor::DCMotor | ( | PWM * | pwm, |
int | gpioNumber, | ||
DCMotor::DIRECTION | direction, | ||
float | speedPercent | ||
) |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |