04-02-2024, 09:52 PM
your code function is when digital input trigger, Toggle relay.
you can replace this code:
digitalWrite(Relay1, !digitalRead(Relay1));
use if .... else ... for ON/OFF relay.
you can replace this code:
digitalWrite(Relay1, !digitalRead(Relay1));
use if .... else ... for ON/OFF relay.