aboutsummaryrefslogtreecommitdiff
path: root/arduino_sketch/fuzzy_alarm_clock_ds1307
diff options
context:
space:
mode:
Diffstat (limited to 'arduino_sketch/fuzzy_alarm_clock_ds1307')
-rw-r--r--arduino_sketch/fuzzy_alarm_clock_ds1307/fuzzy_alarm_clock_ds1307.pde14
1 files changed, 14 insertions, 0 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 9b2e0c9..794b314 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
@@ -179,6 +179,9 @@ void check_serial() {
case 'h':
s_print_help();
break;
+ case 'r':
+ s_reset_alarms();
+ break;
}
}
@@ -299,6 +302,17 @@ void s_led_test() {
}
}
+void s_reset_alarms() {
+ for ( int i = 0 ; i < NALARMS ; i ++ ) {
+ for ( int j = 0; j < 5 ; j ++ ) {
+ alarms[i][j] = 0;
+ }
+ }
+ st = 0;
+ a = -1;
+ save_status();
+}
+
void s_print_help() {
Serial.println("");
Serial.println(" a<s> - set an alarm");