Hello,
I am keerthana.I am using energia version 0005a. I am working with real time clock DS1307, and i have added the library file .After adding library the library is found in examples but while running it i get an error. Can anyone help me in correcting this error?
#include <Wire.h> #include "RTClib.h"
RTC_DS1307 rtc;
void setup () {
Serial.begin(57600);
#ifdef AVR
Wire.begin();
#else
Wire.begin(); // Shield I2C pins connect to alt I2C bus on Arduino Due
#endif
rtc.begin();
if (! rtc.isrunning()) {
Serial.println("RTC is NOT running!");
// following line sets the RTC to the date & time this sketch was compiled
// rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
// This line sets the RTC with an explicit date & time, for example to set
// January 21, 2014 at 3am you would call:
rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0));
}
}
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);
}
ERROR:
In file included from C:\Program Files\energia-0005a\hardware\msp430\libraries\Wire\Wire.cpp:33:0:
C:\Program Files\energia-0005a\hardware\msp430\libraries\Wire\utility/twi.h:35:2: error: #error "********** USI not available"