Hello everyone! I’m having some problems with the rtc ds1302 module, I would like to turn on a led at a specific time in my case 12:00:00 every single day. Here is what I did.

RTC_24hr.ino (2 KB)

  if (printTime==12, 00, 00)

What were you smoking when you wrote this crap?

Pay some attention to what the printTime() function does. It gets the current time. Don't you think you need to do that, too? The Time object has integral fields that contain the hour, minute, and second.

  Time t = rtc.time();
  if(t.hr == 12 && t.min == 0 && t.sec == 0)
     // do whatever needs doing

And remember to switch the led off at some time also...