i need help in how to switch a relay with RTC DS1302

I have been trying to activate a relay via the RTC DS1302, but I can not make it work, please help me, i know that sounds stupid, but please help me, i used different libraries like the virtuabotixRTC, the DS1302RTC, RTClib, Time, Timelib, TimeAlarm but it cant work

I have been trying to activate a relay via the RTC DS1302, but I can not make it work, please help me, i know that sounds stupid, but please help me, i used different libraries like the virtuabotixRTC, the DS1302RTC, RTClib, Time, Timelib, TimeAlarm but it cant work, i dont know what i make bad

oye.ino (964 Bytes)

That chip does not have an alarm output so the Arduino must compare the time.

Have you been able to read the current time from the RTC and display it?

What does Serial Monitor show when you run your sketch?

I tried with this code, but i cant make it work, somebody can help me?, i really new with the arduino, so please, understand my stupidity

oye.ino (964 Bytes)

@Mr-Cucumber9, please stop cross-posting. Threads merged.

pinMode(OUTPUT, 3);
  digitalWrite(HIGH, 3);
  pinMode(OUTPUT, 4);
  digitalWrite(HIGH, 4);

Some of your syntax is reversed. You want digitalWrite(pin, value) and pinMode(pin,mode).

https://www.arduino.cc/en/Reference/DigitalWrite
https://www.arduino.cc/en/Reference/PinMode

Well, that is not my problem now (thanks for the help :D), now i trying to found the library “Buttons.h” (no button.h) for this code, if some expert in arduino found a mistake in the code, please say it to me, now i trying to make a timer relay but without the DS 1302, however, thank you

relayTimer.ino (3.64 KB)

OH!, and Mr John Wasser, when i run the skecth in my serial monitor, the information showed was the time in seconds, minutes and hours