From 16af2a7ec13e481c993d31bdfe6d9b2cc644f7a4 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Fri, 2 Sep 2011 10:16:28 +0200 Subject: Arduino sketch: comments etc. --- ds1307/arduino_sketch/fuzzy_alarm_clock_ds1307.pde | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ds1307/arduino_sketch') diff --git a/ds1307/arduino_sketch/fuzzy_alarm_clock_ds1307.pde b/ds1307/arduino_sketch/fuzzy_alarm_clock_ds1307.pde index bfedfd7..bf1c8f2 100644 --- a/ds1307/arduino_sketch/fuzzy_alarm_clock_ds1307.pde +++ b/ds1307/arduino_sketch/fuzzy_alarm_clock_ds1307.pde @@ -10,10 +10,10 @@ // number of available alarms #define NALARMS 4 +// pins and addressed #define RPIN 3 #define YPIN 5 #define BPIN 6 - #define DS1307_ADDRESS 0x68 int st = 0; // alarm status (minutes from alarm - TIN) @@ -22,7 +22,7 @@ char cmin; // current minute int a = -1; // current alarm void setup () { - Serial.begin(57600); + Serial.begin(9600); Wire.begin(); set_time(11,9,2,5,0,0,0); @@ -35,10 +35,12 @@ void setup () { digitalWrite(YPIN,0); digitalWrite(BPIN,0); - // read alarms from storage + // read alarms and status from storage for ( int i = 0 ; i < NALARMS ; i ++ ) { alarms[i][0] = 0; } + st = 0; + a = -1; } void loop () { @@ -46,10 +48,8 @@ void loop () { // read commands from serial // read time, check alarms - check_time(); Serial.println(st); - // act on status: LEDs and buzzer if ( st > 0 ) { -- cgit v1.2.3