DS1302RTC.h and DS1302RTC.cpp gave a compile error on the Mega

Hello,

I downloaded the library DS1302RTC.h and DS1302RTC.cpp and put them in de directory C:\Program Files\Arduino\libraries\DS1302

By compiling the code for the MEGA 2560 I got next error:

C:\Program Files\Arduino\libraries\DS1302/DS1302RTC.h:97:26: error: 'tmElements_t' has not been declared

static uint8_t read(tmElements_t &tm);

^

C:\Program Files\Arduino\libraries\DS1302/DS1302RTC.h:98:27: error: 'tmElements_t' has not been declared

static uint8_t write(tmElements_t &tm);

^

exit status 1
Fout bij het compileren van board Arduino Mega ADK

Is there someone who can help me declaring tmElements?

Greetings
Erwin

DS1302RTC.cpp (11.5 KB)

DS1302RTC.h (3.94 KB)

You may have an incompatible Time.h file or library, which obviously does not define the tmElements_t type. Either get a newer Time or DS1302RTC library, which can work together.