Permalink
Browse files

renamed settime file

  • Loading branch information...
1 parent ac7cbe6 commit 0498d21051b6c729495f0f1966a58e930c796787 @MrAlvin committed Jan 28, 2012
Showing with 0 additions and 36 deletions.
  1. +0 −36 examples/settime/settime.ino
@@ -1,36 +0,0 @@
-// Set date and time using a DS1307 RTC connected via I2C
-//
-// Connect SCL to Uno-Analog 0
-// Connect SDA to Uno-Analog 1
-
-#include <Wire.h>
-#include "RTClib.h"
-
-RTC_DS1307 RTC; // Setup an instance of DS1307 naming it RTC
-
-void setup () {
- Serial.begin(57600); // Set serial port speed
- Wire.begin(); // Start the I2C
- RTC.begin(); // Init RTC
- RTC.adjust(DateTime(__DATE__, __TIME__)); // Time and date is expanded to date and time on your computer at compiletime
- Serial.print('Time and date set');
-}
-
-void loop () {
- DateTime now = RTC.now();
-
- Serial.print(now.year(), DEC);
- Serial.print('/');
- Serial.print(now.month(), DEC);
- Serial.print('/');
- Serial.print(now.day(), DEC);
- Serial.print(' ');
- Serial.print(now.hour(), DEC);
- Serial.print(':');
- Serial.print(now.minute(), DEC);
- Serial.print(':');
- Serial.print(now.second(), DEC);
- Serial.println();
-
- delay(3000);
-}

0 comments on commit 0498d21

Please sign in to comment.