キッチンタイマーのプログラムです

Dependencies:   mbed SevenSegLed Sound_pwmToDig SwAnalog

回路やプログラムについての詳しい説明は、下記のblogにまとめました。 http://suupen-make.blogspot.jp/2013/11/lpc1114fn28mbedkitchen-timer.html

Files at this revision

API Documentation at this revision

Comitter:
suupen
Date:
Sun Jan 15 04:22:00 2012 +0000
Parent:
0:032a7d6c30d8
Child:
2:269bb751dd19
Commit message:

Changed in this revision

Sound.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Sound.lib	Sun Jan 08 22:52:20 2012 +0000
+++ b/Sound.lib	Sun Jan 15 04:22:00 2012 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/suupen/code/Sound/#059d4df77110
+http://mbed.org/users/suupen/code/Sound/#c342b5349740
--- a/main.cpp	Sun Jan 08 22:52:20 2012 +0000
+++ b/main.cpp	Sun Jan 15 04:22:00 2012 +0000
@@ -1,7 +1,11 @@
+//#define debug
 //===========================================================================
 // mbed seven segment LED PCB board example program
 //
 // kitchen timer
+//
+// V1.0 120109
+// V1.1 120115 bug fix (40min ihyo no settei de merody ga naranai)
 // 
 // <schematic>
 // 1.seven segment numeric LED Display : OSL40562-LR
@@ -258,21 +262,20 @@
       }
       break;
     
-    case chime:
-        if(sound.sound_sound() == false){           
-            if(D_timerSec == (3 * 60)){
-                sound.sound_enso((Sound::sound_t*)RAMEN);
-            }
-            else if(D_timerSec < (60 * 60)){
-                sound.sound_enso((Sound::sound_t*)WESTMINSTER);
-            }
-            else{
-                sound.sound_enso((Sound::sound_t*)DEMEKIN);
-            }
+    case chime: // 120115 bug fix
+        if(D_timerSec == (3 * 60)){
+            sound.sound_enso((Sound::sound_t*)RAMEN);
+        }
+        else if(D_timerSec < (60 * 60)){
+            sound.sound_enso((Sound::sound_t*)WESTMINSTER);
+        }
+        else{
+            sound.sound_enso((Sound::sound_t*)DEMEKIN);
+        }
             
-            sound.sound_enso(true);
-            M_timer = timeup;
-        }
+        sound.sound_enso(true);
+        M_timer = timeup;
+        
         break;
     
     case timeup:
@@ -437,6 +440,15 @@
 
         break;
     case chime: // same "timeup"
+
+#ifdef debug
+    D_7seg[0] = 0x0E;
+    D_7seg[1] = 0x10;
+    D_7seg[2] = 0x10;
+    D_7seg[3] = 0x10;
+    break;
+#endif //debug
+
     case timeup:
         if(F_flip500ms == 1){
             D_7seg[0] = 0x0f;