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

Dependents:   kiokuryoku_game escapeFromYou junirobo_sample001 ROBOX_Sample_IRcon ... more

Revision:
4:237b642c2ffa
Parent:
3:86238dba1529
Child:
5:a64e653b0ce1
diff -r 86238dba1529 -r 237b642c2ffa beep_sound.h
--- a/beep_sound.h	Tue Jun 28 09:47:46 2016 +0000
+++ b/beep_sound.h	Sat Jul 09 11:39:11 2016 +0000
@@ -7,9 +7,15 @@
     int note;
     float time_s;
 };
-
+/*
+struct beep{
+    float userPeriod;
+    float userWrite;
+    float time_s;
+}
+*/
 const int frequencyTable[] = {261, 277, 294, 311, 330, 349,
-                                370, 392, 415, 440, 466, 494};
+                                370, 392, 415, 440, 466, 494, 100};
 
 
 class beep_sound
@@ -28,7 +34,7 @@
         void beep_readyGo(int nTimes);
         void beep_encount(int nTimes);
         // 以下並列で鳴らすための関数
-        void stop();
+        void stopGakuhu();
         void setGakuhu(int argOc, int argNo, float argTi);
         void setKyuhu(float argTi);
         void playGakuhu();
@@ -38,7 +44,7 @@
         int frequency;
         // 以下並列で鳴らすための宣言
         queue<gakuhu> otoQue;
-        gakuhu buf;
+        gakuhu bufG;
         Timeout interruptStop;
 };