diff options
author | Elena ``of Valhalla'' Grandi <elena.valhalla@gmail.com> | 2011-09-02 10:16:28 +0200 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <elena.valhalla@gmail.com> | 2011-09-02 10:16:28 +0200 |
commit | 16af2a7ec13e481c993d31bdfe6d9b2cc644f7a4 (patch) | |
tree | a044e7296c7f58cd0b81b1abd770e0b11990cbb7 | |
parent | a181e534745252e4799be7bde14b2ac132110b25 (diff) |
Arduino sketch: comments etc.
-rw-r--r-- | ds1307/arduino_sketch/fuzzy_alarm_clock_ds1307.pde | 10 |
1 files changed, 5 insertions, 5 deletions
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 ) { |