Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Date and time functions using just software, based on millis() & timer
- #include <Wire.h>
- #include "RTClib.h"
- RTC_Millis RTC;
- int led = 3;
- void setup () {
- Serial.begin(57600);
- // following line sets the RTC to the date & time this sketch was compiled
- RTC.begin(DateTime(__DATE__, __TIME__));
- pinMode(led, OUTPUT);
- }
- void loop () {
- DateTime now = RTC.now();
- if((now.hour() == 17) && (now.minute() == 1)){
- digitalWrite(led, HIGH);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment