Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
 - 1:541aec45f686
 - Parent:
 - 0:ca1e30a0c763
 - Child:
 - 2:63b2a561690e
 
--- a/main.cpp	Sun Aug 16 12:26:34 2015 +0000
+++ b/main.cpp	Sun Aug 16 12:29:00 2015 +0000
@@ -40,13 +40,13 @@
         analogInValue = analogInModule;
         pc.printf("analogInValue='%f' :", analogInValue);
         //analogValue小さい時はスピーカーをオフにする。
-        if(analogInValue < 0.05){
+        if(analogInValue < 0.05) {
             speaker.write(SP_OFF);
             pc.printf("OFF\n\r");
         } else {
             //処理:
-            tunedValue = tuning(analogInValue);
-            interval = 1.0 / tunedValue;//周波数(Hz)を周期(秒)に変換
+            tunedValue = tuning(analogInValue); //tuning関数で入力値を調整
+            interval = 1.0 / tunedValue;        //周波数(Hz)を周期(秒)に変換
             //出力設定
             speaker.period(interval);
             speaker.write(SP_ON);