DS1307 RTC setting time

I am getting “29:69:70 9/29/69”. as the time output

I’ve tried setting the time, to no avail. I’ve tried code from both sites below.

There aren’t 29 hours in a day
There aren’t 69 minutes in an hour
There aren’t 70 seconds in a minute

http://bildr.org/2011/03/ds1307-arduino/

http://combustory.com/wiki/index.php/RTC1307_-_Real_Time_Clock

What next?

weather_station.pde (16.3 KB)

figured it out, thanks to DS1307/SetDateBySerial.pde at master · turicas/DS1307 · GitHub

Also, an Arduino reset is required before setting the time.

I used the input “T2011-11-14 22:22:35 1”

 /*
   Please enter date and time in the format "YYYY-MM-DD HH:MM:SS D"
   Where D is the number of the day of week (0 = Sunday, 6 = Saturday).
   Example: 2011-04-23 02:25:27 6   
   */

11/14/11 10:25:16 PM
Time since last boot: 168 seconds
Temperature: 86.33 DegF, 30.18 DegC
Humidity: 58.25 % (538)
Corrected Humidity: 58.25 %
Dew Point: 53.04 DegF, 21.04 DegC
Barometer: 98365.00 pascals, 983.65 mb, 29.05 inHg
Saturated Vapor Pressure: 42.77 mb, 1.26 inHg
Actual Vapor Pressure: 24.92 mb, 0.74 inHg
Water Grains: 115.74 per lb of air
Air Density Altitude: 1557.67 Feet

All that is left on this project, is getting the new Humidity sensor :slight_smile:

weather_station.pde (16.9 KB)