このライブラリでは、単音とメロディの出力が可能です。 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
Diff: Sound.h
- Revision:
- 4:dc8c3e896c80
- Parent:
- 3:2f5107cb0589
- Child:
- 5:9d861f258467
--- a/Sound.h Wed Nov 16 12:34:11 2011 +0000 +++ b/Sound.h Wed Nov 16 12:40:22 2011 +0000 @@ -22,6 +22,16 @@ * *Sound sound(p21, p10); // 1tu me no sound syuturyoku (pwmOut = p21, digitalOut = p10) * +* +* <scematic> +* +* -------- _/ +* mbed(p21) -----|R:200ohm|----| | speaker +* pwmOut -------- +* | | +* mbed(p10) -------------------|_| +* digitalOut \ +* * //-------------------------------- * // "westminster chime" merody data * //--------------------------------