Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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. | |
void | forcebrake () |
Brake lebih baik. |
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 Tue Jul 12 2022 22:57:42 by
