Pages: [1]   Go Down
Author Topic: DS1307 test sketch  (Read 1932 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Arduino on the rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

While debugging the code for a larger Arduino sketch/shield project, I isolated the RTC code in a separate sketch. Finding the problem was not there I thought it might be of interest or amusement for others. It used the DS1307new library, but adapting to other DS1307 libraries should not be difficult.

The sketch uses just the serial port as interface, but an LCD might show the time. It currently allows getting and setting the time and date with simple commands.

D or Dyyyymmdd to get or set the date
T or Thhmmss to get or set the time

Commands are terminated with a carriage-return, a line-feed or a dot. So the Serial Monitor can be used.

Have fun.

* RTCTest.pde (5.33 KB - downloaded 33 times.)
Logged

Pages: [1]   Go Up
Jump to: