Relay with switch
Development
5
Posts
3
Posters
3.1k
Views
3
Watching
-
I think you just need to change this line:
if (value != oldValue && value==0) {to
if (value != oldValue) {And wire the original switch , in order to short GND and pin 3. The original wires now go to the relay (and not more to the switch).
You need to somehow power arduino + radio + relay , I use cheap phone chargers but the risk of fire is too high. We are testing other alternatives here.
And please be careful when working with AC Mains! It is letal! ;-)