diff options
Diffstat (limited to 'ds1307')
-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 ) { |