diff options
Diffstat (limited to 'arduino_sketch')
-rw-r--r-- | arduino_sketch/fuzzy_alarm_clock_ds1307/fuzzy_alarm_clock_ds1307.pde | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arduino_sketch/fuzzy_alarm_clock_ds1307/fuzzy_alarm_clock_ds1307.pde b/arduino_sketch/fuzzy_alarm_clock_ds1307/fuzzy_alarm_clock_ds1307.pde index 1b5fd89..ae5b4c9 100644 --- a/arduino_sketch/fuzzy_alarm_clock_ds1307/fuzzy_alarm_clock_ds1307.pde +++ b/arduino_sketch/fuzzy_alarm_clock_ds1307/fuzzy_alarm_clock_ds1307.pde @@ -45,7 +45,7 @@ int st = 0; // alarm status (minutes from alarm - TIN) char alarms[NALARMS][5]; // alarm settings char cmin; // current minute signed char a = -1; // current alarm -char dbg = 0; // print debug informations +bool dbg = false; // print debug informations bool ringing = false; // sound the alarm bool pressed = false; // stop button status @@ -285,9 +285,9 @@ void s_print_time() { void s_toggle_debug() { if ( dbg ) { - dbg = 0; + dbg = false; } else { - dbg = 1; + dbg = true; } } @@ -313,6 +313,9 @@ void s_reset_alarms() { st = 0; a = -1; save_status(); + analogWrite(RPIN,128); + digitalWrite(YPIN,LOW); + digitalWrite(BPIN,LOW); } void s_print_help() { @@ -329,6 +332,7 @@ void s_print_help() { Serial.println(" p - print the alarms"); Serial.println(" t - print the clock"); Serial.println(" d - toggle printing of debug informations"); + Serial.println(" r - reset status and alarms"); Serial.println(" l - test LEDs"); Serial.println(" h - print this help"); } |