47Views3Replies

Author Options:

help arduino help please Answered

i need help adding a manual momentary switch to this sketch to control the same pin as the network button

any help would be greatly appreciated i couldn't figure out how to post code properly so i attached the example i'm using in zip format

pretty much i need to add a momentary switch for on off to living pin in the example without losing the control from the network on the same pin

its controlling my lights i just want a button to control them manually and from browser

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
Downunder35m
Downunder35m

4 years ago

If the input is going onto a pin already it means you have a 5V or 3.3V input there already.
Why not simply add the switch between this supply voltage and the pin?
Won't make any difference if the signal comes from a network device or directly.
You might need to a a diode though to prevent the power from entering the output of the network control.

0
vapasaurusrex
vapasaurusrex

Reply 4 years ago

This would be fine if using a latching switch but I'm trying to use a momentary switch so the voltage wouldn't be constant

0
Downunder35m
Downunder35m

Reply 4 years ago

Switch is switch, on - off, either way.
There is no voltage difference.
Either you fail to explain the real problem or you need to check how a switch works.