This is a sample that drives a speaker with PWM.
Fork of GR-PEACH_Audio_WAV by
This is a sample that drives a speaker with PWM. This sample will play a ".wav" file of the microSD or USB memory root folder. If the USER_BUTTON0 is pressed, the next song is played.
Format | Wav file (RIFF format) ".wav" |
Channel | 1ch and 2ch |
Frequencies | 32kHz, 44.1kHz and 48kHz |
Quantization bit rate | 8bits and 16bits |
You can adjust the volume by changing the following.
main.cpp
AudioPlayer.outputVolume(0.5); // Volume control (min:0.0 max:1.0)
The default setting of serial communication (baud rate etc.) in mbed is shown the following link.
Please refer to the link and change the settings of your PC terminal software.
The default value of baud rate in mbed is 9600, and this application uses baud rate 9600.
https://developer.mbed.org/teams/Renesas/wiki/GR-PEACH-Getting-Started#install-the-usb-serial-communication
Revisions of main.cpp
Revision | Date | Message | Actions |
---|---|---|---|
16:63d0cf9e117b | 2018-07-24 | Changed to be usable with EasyPlayback | File Diff Annotate |
15:570acc3d2b89 | 2018-07-24 | upports mbed-os 5.9.1 and later | File Diff Annotate |
14:f3eda9558df6 | 2017-07-06 | Change volume | File Diff Annotate |
13:7e3063fc0e10 | 2017-07-06 | Simplified sample | File Diff Annotate |
11:221c23d820d9 | 2017-03-24 | Supports mbed os 5.4. | File Diff Annotate |
10:e8f52c4aa394 | 2016-12-20 | Change volume setting. | File Diff Annotate |
9:c7c0a97fdb7f | 2016-12-20 | Changed to sample to drive the speaker with PWM. | File Diff Annotate |
8:7121197d098e | 2016-04-18 | Supports IAR. | File Diff Annotate |
7:4b6799c255ea | 2015-08-18 | High-Resolution Audio | File Diff Annotate |
5:983467c1466b | 2015-06-24 | bug fixed | File Diff Annotate |
4:01651a6c3f9a | 2015-06-24 | improving readability | File Diff Annotate |
1:967144cffd53 | 2015-06-02 | improving readability | File Diff Annotate |
0:a24aaf3a41b1 | 2015-06-01 | first commit | File Diff Annotate |