Delay relay

Hi,

Can someone please help me with the code for my project?
What i want to do is - with a push of a switch to energise a relay for 5 min and if i push the switch again in those 5 min to eliminate the time left and switch off the relay.
But i'm new in coding and i need it ASAP.

Thank you in advance :slight_smile:

hevrosy:
Hi,

Can please some help me with the code for my project?
Wath i want to do is with a push of a switch to energise a relay for 5 min and if i push the switch again in tholse 5 min to eliminate the left time and switch off the relay.But iโ€™m new in coding and i need it ASAP.

Thank you in addvance :slight_smile:

If time is really critical, why did you not include the code you have tried and what it does and what it does not do?

That presupposes you have actually wired up the Arduino, the switch and the relay. And then tell what relay you are using and what power supply you use to operate the relay.

Paul

This is what i have in mind

5v-relay-driver-circuit-module-circuit-diagram_0.png

hevrosy:
This is what i have in mind

Are we to assume you are willing to pay someone to write the program for you?

Paul

5v-relay-driver-circuit-module-circuit-diagram_0.png

If you donโ€™t limit the base current, you will damage the controller.