I am trying to talk to a DS1307 real-time clock module I got from Sparkfun. I want to use Matts DS1307 libraries but I can't get his example code to compile.
I get:
vr/include/stdlib.h:111: error: expected unqualified-id before 'int'
That line in stdlib is the extern declaration for abs() and it looks fine to me. I moved the line around and the error moves with it.
//#include <Wire.h>
#include <DS1307.h>
int rtc[7];
void setup()
{
Serial.begin(9600);
/*
RTC.stop();
RTC.set(DS1307_SEC,1);
RTC.set(DS1307_MIN,23);
RTC.set(DS1307_HR,12);
RTC.set(DS1307_DOW,1);
RTC.set(DS1307_DATE,1);
RTC.set(DS1307_MTH,10);
RTC.set(DS1307_YR,7);
RTC.start();
*/
}
void loop()
{
// RTC.get(rtc,true);
for(int i=0; i<7; i++)
{
Serial.print(rtc[i]);
Serial.print(" ");
}
Serial.println();
delay(1000);
}