27 #include "../gpio/GPIO.h"
28 #include "../gpio/PWM.h"
30 #define DEFAULT_DCMOTOR_PWM_PERIOD 4000
31 #define DEFAULT_DCMOTOR_SPEED 50.0f
virtual void stop()
Definition: DCMotor.cpp:96
virtual void setDirection(DIRECTION direction)
Definition: DCMotor.cpp:77
virtual void setDutyCyclePeriod(unsigned int period_ns)
Definition: DCMotor.cpp:104
A class to control a basic PWM output – you must know the exact sysfs filename for the PWM output...
Definition: PWM.h:43
GPIO class for input and output functionality on a single GPIO pin.
Definition: GPIO.h:46
virtual ~DCMotor()
Definition: DCMotor.cpp:108
DIRECTION
Definition: DCMotor.h:42
A generic DC motor class that controls a motor driver board using a PWM signal,and a GPIO state to co...
Definition: DCMotor.h:40
virtual DIRECTION getDirection()
Definition: DCMotor.h:60
Definition: BusDevice.cpp:27
virtual void reverseDirection()
Definition: DCMotor.cpp:87
virtual void setSpeedPercent(float speedPercent)
Definition: DCMotor.cpp:72
virtual float getSpeedPercent()
Definition: DCMotor.h:58
virtual void go()
Definition: DCMotor.cpp:100
DCMotor(PWM *pwm, GPIO *gpio)
Definition: DCMotor.cpp:29