Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Wire.h>
- #include "RTClib.h"
- RTC_DS1307 rtc;
- char Teste;
- //--------------------------------------------------
- void setup () {
- Serial.begin(57600);
- Wire.begin();
- rtc.begin();
- if (! rtc.isrunning())
- {
- Serial.println("RTC is NOT running!");
- rtc.adjust(DateTime(2015,6,8,19,11,55));
- }
- }
- //--------------------------------------------------
- void loop ()
- {
- DateTime now = rtc.now();
- Serial.print(now.year(), DEC);
- Teste = (now.year(), DEC);
- delay(3000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement