I have been working on a datalogger with a timestamp and started by looking at example code provided by Sparkfun on the DS1307 product page. I have not been able to get any of the examples to compile. A long list of compile errors are given. I am using Arduino ERW 1.04 with the RTClib available by following links from the Sparkfun site so assume it is the right version of RTClib (I have found several others and even tried some of those). A typical compiler errors are:
In file included from C:\Users\Fader\Documents\Arduino\libraries\RTClib/RTC_DS1307.h:7,
from C:\Users\Fader\Documents\Arduino\libraries\RTClib\RTC_DS1307.cpp:13:
C:\Users\Fader\Documents\Arduino\libraries\RTClib/RTClib.h:5: error: redefinition of ‘class DateTime’
C:\Users\Fader\Documents\Arduino\libraries\RTClib/RTClib.h:5: error: previous definition of ‘class DateTime’
C:\Users\Fader\Documents\Arduino\libraries\RTClib/RTClib.h:29: error: redefinition of ‘class RTC_DS1307’
C:\Users\Fader\Documents\Arduino\libraries\RTClib/RTClib.h:29: error: previous definition of ‘class RTC_DS1307’
C:\Users\Fader\Documents\Arduino\libraries\RTClib\RTC_DS1307.cpp: In static member function ‘static void RTC_DS1307::adjust(const DateTime&)’:
C:\Users\Fader\Documents\Arduino\libraries\RTClib\RTC_DS1307.cpp:48: error: ‘bin2bcd’ was not declared in this scope
C:\Users\Fader\Documents\Arduino\libraries\RTClib\RTC_DS1307.cpp: In static member function ‘static DateTime RTC_DS1307::now()’:
C:\Users\Fader\Documents\Arduino\libraries\RTClib\RTC_DS1307.cpp:66: error: ‘bcd2bin’ was not declared in this scope
If anyone can point out to me what I am missing I would appreciate the help.
Thanks.