Ciao Marco,
so I've did this simple sketch could be a good starting point:
#include <Time.h>
char s[15];
char s1[15];
byte y1,mon1,d1,h1,min1,sec1;
void setup(){
Serial.begin(9600);
setTime(9,25,00,6,2,13);
y1 = 13;
mon1 = 2;
d1 = 6;
h1 = 9;
min1 = 25;
sec1 = 01;
}
void loop(){
time_t t = now();
sprintf(s, "%04d%02d%02d%02d%02d%02d", year(t), month(t), day(t), hour(t), minute(t), second(t));
sprintf(s1, "%04d%02d%02d%02d%02d%02d", (y1+2000), mon1, d1, h1, min1, sec1);
// Debug
Serial.println("Stampo S ");
Serial.println(s);
Serial.println("Stampo S1 ");
Serial.println(s1);
if (strcmp(s,s1) == 0)
{
Serial.println("Condition Verified");
}
delay(1000);
}
so now just to think about the structure how use it ?
do you think that could be fine ?
thanks
gnux