![](/media/cache/profiles/90a82bf94b4c5981e7e68ff425e519f3.50x50_q85.jpg)
キッチンタイマーのプログラムです
Dependencies: mbed SevenSegLed Sound_pwmToDig SwAnalog
回路やプログラムについての詳しい説明は、下記のblogにまとめました。 http://suupen-make.blogspot.jp/2013/11/lpc1114fn28mbedkitchen-timer.html
Diff: main.cpp
- Revision:
- 1:f638c70e028c
- Parent:
- 0:032a7d6c30d8
- Child:
- 2:269bb751dd19
--- 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;