このライブラリでは、単音とメロディの出力が可能です。 In this library, you can output a single tone and melody. mbedのpwmOutとDigitalOutを使ってスピーカや圧電ブザーを直接駆動します。 directly drive speaker or buzzer and DigitalOut pwmOut using the mbed. メロディデータは、mbedのローカルにtxtファイルとして保存するか、プログラム中に配列データとして保存してください。 Melody data is either stored in a txt file on the local mbed, save it as a data array in the program.

Dependents:   kitchenTimer_Clock SoundLibraryExample_Melody_ProgramData M3PI_SuiviLigne

Files at this revision

API Documentation at this revision

Comitter:
suupen
Date:
Wed Nov 16 13:58:47 2011 +0000
Parent:
5:9d861f258467
Child:
7:758ad151b16f
Commit message:

Changed in this revision

Sound.h Show annotated file Show diff for this revision Revisions of this file
--- a/Sound.h	Wed Nov 16 13:57:19 2011 +0000
+++ b/Sound.h	Wed Nov 16 13:58:47 2011 +0000
@@ -17,10 +17,10 @@
 * @code
 * // Continuously sweep the servo through it's full range
 *
-*#include "mbed.h"
-*#include "pwmSound.h"       // pwm sound library header
+* #include "mbed.h"
+* #include "pwmSound.h"       // pwm sound library header
 *
-*Sound sound(p21, p10);      // 1tu me no sound syuturyoku (pwmOut = p21,  digitalOut = p10)
+* Sound sound(p21, p10);      // 1tu me no sound syuturyoku (pwmOut = p21,  digitalOut = p10)
 *
 *
 * <scematic>
@@ -55,9 +55,9 @@
 *    };
 *
 * /--------------------------------------
-** main
+* * main
 * /---------------------------------------
-*int main() {
+* int main() {
 *
 * //---------------------
 * // enso data no settei