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.
Motorfader Class Reference
Motorfader control class, based on a PwmOut. More...
#include <Motorfader.h>
Public Member Functions | |
| Motorfader (PinName analogpin, PinName cwpin, PinName ccwpin) | |
| Create a servo object connected to the specified PwmOut pin. | |
| void | set (float pos, float vel) |
| Set position. | |
| float | get () |
| Get position. | |
Detailed Description
Motorfader control class, based on a PwmOut.
Example:
// Continuously sweep the servo through it's full range #include "mbed.h" #include "WT20003M03.h" WT20003M03 myaudio(p21); int main() { mysound.volume(8); while(1) { myaudio.play(); wait(10); } }
Definition at line 47 of file Motorfader.h.
Constructor & Destructor Documentation
| Motorfader | ( | PinName | analogpin, |
| PinName | cwpin, | ||
| PinName | ccwpin | ||
| ) |
Create a servo object connected to the specified PwmOut pin.
- Parameters:
-
pin DigitalOut pin to connect to
Definition at line 27 of file Motorfader.cpp.
Member Function Documentation
| float get | ( | ) |
| void set | ( | float | pos, |
| float | vel | ||
| ) |
Generated on Tue Jul 12 2022 15:40:53 by
1.7.2