ölk

ghj

try something like the following in your sketch :

#include <DS3231.h> 
DS3231 myDs ;
. . .
. . .

Serial.println( myDs.unixtime()  ) ;
. . .
. . .

6v6gt:
try something like the following in your sketch :

#include <DS3231.h> 

DS3231 myDs ;
. . .
. . .

Serial.println( myDs.unixtime()  ) ;
. . .
. . .

I try this but i get this Error:

error: within this context
exit status 1
within this context

Please post the program that caused the error.

   int UnixTimeStamp;
    int address = 0;
    
    Serial.println("PIN CHANGED!\n");

    dt.unixtime = UnixTimeStamp;   <------------------------this was my solution

If it worked that would set UnixTimeStamp to an unknown value. Surely you want to set UnixTimeStamp to the Unix time from the RTC

That snippet is not enough to see what you are doing

What I does show is that you could do with looking at the EEPROM put() and get() functions to write and read your long variable in an easier way.

BTW - don’t print in what I assume from the name is an ISR as interrupts will be disabled.

Pupsikwest:
ghj

Enjoy your timeout.