PWM出力によって圧電スピーカーで容易に音を鳴らすことができるライブラリです。

Dependents:   kiokuryoku_game escapeFromYou junirobo_sample001 ROBOX_Sample_IRcon ... more

Revision:
2:259899b723ab
Parent:
1:afc63ce6369b
Child:
3:86238dba1529
diff -r afc63ce6369b -r 259899b723ab beep_sound.h
--- a/beep_sound.h	Sat Jun 04 13:38:10 2016 +0000
+++ b/beep_sound.h	Sat Jun 04 17:50:58 2016 +0000
@@ -5,17 +5,13 @@
 const int frequencyTable[] = {261, 277, 294, 311, 330, 349,
                                 370, 392, 415, 440, 466, 494};
 
+
 class beep_sound
 {
     public:
         beep_sound(PinName pwm);
         ~beep_sound();
         void SetFrequency(int octave, int note, bool on_off);
-        /** 音符
-        * @param octave オクターブ
-        * @param note 音階
-        * @param time_s 鳴らす長さ
-        */
         void onpu(int octave, int note, float time_s);
         void sinwave(float center,int speed,int width);
         void setwave(float frequency,float duty,float wait);
@@ -23,6 +19,7 @@
         void beep_wrong(int nTimes);
         void beep_1up(int nTimes);
         void beep_konbini(int nTimes);
+        void beep_readyGo(int nTimes);
         void beep_encount(int nTimes);
     private:
         PwmOut* m_pwm;