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.
WT20003M03 Class Reference
WT20003M03 control class, based on a PwmOut. More...
#include <WT2003M03.h>
Public Member Functions | |
| WT20003M03 (PinName txpin, PinName rxpin) | |
| Create a servo object connected to the specified PwmOut pin. | |
| void | Play (unsigned int address) |
| Set the addres Play address section audio. | |
| void | Play () |
| Play/recover current address audio. | |
| void | volume (unsigned int volume) |
| Set the volume. | |
| void | Pause () |
| Pause current address audio. | |
| void | Stop () |
| After send command, single cycle. | |
| void | Next () |
| Play next. | |
| void | Previous () |
| Play Previous. | |
| char | ReadVolume () |
| Read volume. | |
| char | ReadState () |
| Read state. | |
Detailed Description
WT20003M03 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 WT2003M03.h.
Constructor & Destructor Documentation
| WT20003M03 | ( | PinName | txpin, |
| PinName | rxpin | ||
| ) |
Create a servo object connected to the specified PwmOut pin.
- Parameters:
-
pin DigitalOut pin to connect to
Definition at line 27 of file WT2003M03.cpp.
Member Function Documentation
| void Next | ( | ) |
| void Pause | ( | ) |
Pause current address audio.
- Parameters:
-
Pause current address audio.
Definition at line 62 of file WT2003M03.cpp.
| void Play | ( | unsigned int | address ) |
Set the addres Play address section audio.
- Parameters:
-
addres
Definition at line 31 of file WT2003M03.cpp.
| void Play | ( | ) |
Play/recover current address audio.
- Parameters:
-
Play/recover current address audio.
Definition at line 42 of file WT2003M03.cpp.
| void Previous | ( | ) |
| char ReadState | ( | ) |
| char ReadVolume | ( | ) |
| void Stop | ( | ) |
After send command, single cycle.
- Parameters:
-
After send command, single cycle.
Definition at line 66 of file WT2003M03.cpp.
| void volume | ( | unsigned int | volume ) |
Set the volume.
- Parameters:
-
volune audio volume(0-16) in volume
Definition at line 51 of file WT2003M03.cpp.
Generated on Sat Aug 6 2022 08:25:46 by
1.7.2