diff options
author | Elena ``of Valhalla'' Grandi <elena.valhalla@gmail.com> | 2012-01-26 07:09:47 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <elena.valhalla@gmail.com> | 2012-01-26 07:09:47 +0100 |
commit | ad91932ec1eafc7f88604dba85d5327e82205c81 (patch) | |
tree | 8690d62f1795f74309dcebcb2328385a3a0f76f0 /arduino_sketch/fuzzy_alarm_clock_ds1307 | |
parent | 0dc9cd95010ac7ae60141629367d60472084f132 (diff) |
arduino sketch: fixes to the debug functions
Diffstat (limited to 'arduino_sketch/fuzzy_alarm_clock_ds1307')
-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"); } |