im trying combine time, timealarms & rtclib libraries alarm work off of real time value provided rtc module.
i've found versions have downloaded here apparently dont work together:
http://www.pjrc.com/teensy/td_libs_timealarms.html
just including them in sketch:
i these errors:
how solve this?
i've found versions have downloaded here apparently dont work together:
http://www.pjrc.com/teensy/td_libs_timealarms.html
just including them in sketch:
code: [select]
#include <time.h>
#include <timealarms.h>
#include "rtclib.h"
#include <wire.h>
rtc_ds1307 rtc;
void setup()
{}
i these errors:
quote
in file included timealarmsexample.ino:17:0:so take first one:
/users/quique123/documents/arduino/libraries/rtclib-master/rtclib.h:17:21: error: '__flashstringhelper' not name type
datetime (const __flashstringhelper* date, const __flashstringhelper* time);
^
/users/quique123/documents/arduino/libraries/rtclib-master/rtclib.h:17:42: error: iso c++ forbids declaration of 'date' no type [-fpermissive]
datetime (const __flashstringhelper* date, const __flashstringhelper* time);
^
/users/quique123/documents/arduino/libraries/rtclib-master/rtclib.h:17:54: error: '__flashstringhelper' not name type
datetime (const __flashstringhelper* date, const __flashstringhelper* time);
^
/users/quique123/documents/arduino/libraries/rtclib-master/rtclib.h:17:75: error: iso c++ forbids declaration of 'time' no type [-fpermissive]
datetime (const __flashstringhelper* date, const __flashstringhelper* time);
^
in file included timealarmsexample.ino:14:0:
/users/quique123/documents/arduino/libraries/time/time.h:79:39: error: expected unqualified-id before '/' token
#define dayofweek(_time_) ((( _time_ / secs_per_day + 4) % days_per_week)+1) // 1 = sunday
^
/users/quique123/documents/arduino/libraries/rtclib-master/rtclib.h:24:13: note: in expansion of macro 'dayofweek'
uint8_t dayofweek() const;
^
/users/quique123/documents/arduino/libraries/time/time.h:79:39: error: expected ')' before '/' token
#define dayofweek(_time_) ((( _time_ / secs_per_day + 4) % days_per_week)+1) // 1 = sunday
^
/users/quique123/documents/arduino/libraries/rtclib-master/rtclib.h:24:13: note: in expansion of macro 'dayofweek'
uint8_t dayofweek() const;
^
/users/quique123/documents/arduino/libraries/time/time.h:79:39: error: expected ')' before '/' token
#define dayofweek(_time_) ((( _time_ / secs_per_day + 4) % days_per_week)+1) // 1 = sunday
^
/users/quique123/documents/arduino/libraries/rtclib-master/rtclib.h:24:13: note: in expansion of macro 'dayofweek'
uint8_t dayofweek() const;
^
/users/quique123/documents/arduino/libraries/time/time.h:79:39: error: expected ')' before '/' token
#define dayofweek(_time_) ((( _time_ / secs_per_day + 4) % days_per_week)+1) // 1 = sunday
^
/users/quique123/documents/arduino/libraries/rtclib-master/rtclib.h:24:13: note: in expansion of macro 'dayofweek'
uint8_t dayofweek() const;
^
timealarmsexample.ino: in function 'void setup()':
timealarmsexample.ino:27:3: error: 'rtc' not declared in scope
quote
rtclib.h:17:21: error: '__flashstringhelper' not name typeits telling me rtclib not name type __flashstringhelper.
datetime (const __flashstringhelper* date, const __flashstringhelper* time);
how solve this?
include libraries in following order , compiles,with 1.6.4
code: [select]
#include <wire.h>
#include "rtclib.h"
#include <time.h>
#include <timealarms.h>
rtc_ds1307 rtc;
void setup()
{}
void loop()
{}
Arduino Forum > Using Arduino > Programming Questions > RTClib does not name a type error when adding TimeAlarms library
arduino
Comments
Post a Comment