This is a sample that drives a speaker with PWM.

Dependencies:   EasyPlayback

Fork of GR-PEACH_Audio_WAV by Renesas

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.

/media/uploads/dkato/pwm_speaker_img.png

FormatWav file (RIFF format) ".wav"
Channel1ch and 2ch
Frequencies32kHz, 44.1kHz and 48kHz
Quantization bit rate8bits 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

Files at this revision

API Documentation at this revision

Comitter:
dkato
Date:
Mon Jun 22 09:18:35 2015 +0000
Parent:
1:967144cffd53
Child:
3:6f7591b567a7
Commit message:
Change the class name of the SSIF to R_BSP_Ssif.

Changed in this revision

R_BSP.lib Show annotated file Show diff for this revision Revisions of this file
TLV320_RBSP.lib Show annotated file Show diff for this revision Revisions of this file
--- a/R_BSP.lib	Tue Jun 02 10:19:02 2015 +0000
+++ b/R_BSP.lib	Mon Jun 22 09:18:35 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/dkato/code/R_BSP/#9a5f9b476dbe
+http://developer.mbed.org/users/dkato/code/R_BSP/#b72e037c50c3
--- a/TLV320_RBSP.lib	Tue Jun 02 10:19:02 2015 +0000
+++ b/TLV320_RBSP.lib	Mon Jun 22 09:18:35 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/dkato/code/TLV320_RBSP/#bb69b79a1e05
+http://developer.mbed.org/users/dkato/code/TLV320_RBSP/#4b34a496efac