RTC Relay control

Hi all

Could someone please help me with the code for a setup I would like to do:

A relay that is triggered at a specific time(RTC) but I would still like to have a digital switch to turn it on when I choose.

I've found a link for just the RTC control but not to have a switch with it.

any help would be appreciated. Thanks

just look at any example reading a button press. add in your code that if the button is pressed and the relay active, then turn off the relay

J-M-L: just look at any example reading a button press. add in your code that if the button is pressed and the relay active, then turn off the relay

Thank, that is so easy lol.

I've found a link for just the RTC control but not to have a switch with it.

post the code within code tags so that it looks good like this

// good looking code
void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

bad looking code

void setup() { // put your setup code here, to run once:

}

void loop() { // put your main code here, to run repeatedly:

}

J-M-L: post the code within code tags so that it looks good like this

// good looking code
void setup() {
  // put your setup code here, to run once:

}

void loop() {   // put your main code here, to run repeatedly:

}





**bad looking code**

void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}

Will do, I still a bit new, have played around much.

But will try to keep the code looking nice. Thanks