v2
Dependencies: BEAR_Protocol_Edited BufferedSerial Debug MaxSonar PID Process QEI UI iSerial mbed
Fork of clean_V1 by
Motor Class Reference
Interface to control a standard DC motor with an H-bridge using a PwmOut and 2 DigitalOuts. More...
#include <Motor.h>
Public Member Functions | |
Motor (PinName pwm, PinName fwd, PinName rev) | |
Create a motor control interface. | |
void | speed (float speed) |
Set the speed of the motor. | |
void | period (float period) |
Set the period of the pwm duty cycle. | |
void | brake (int highLow=BRAKE_HIGH) |
Brake the H-bridge to GND or VCC. |
Detailed Description
Interface to control a standard DC motor with an H-bridge using a PwmOut and 2 DigitalOuts.
Definition at line 34 of file Motor.h.
Constructor & Destructor Documentation
Motor | ( | PinName | pwm, |
PinName | fwd, | ||
PinName | rev | ||
) |
Member Function Documentation
void brake | ( | int | highLow = BRAKE_HIGH ) |
void period | ( | float | period ) |
Generated on Thu Jul 14 2022 15:54:29 by 1.7.2