hi all,
I'm trying to use a simple pushbutton to turn a LED on locally for testing purposes but having hard times achieving it.
I have a LED connected to gpio 12 and a push button on pgio 16. I already tried a lot of combinations of the switch configuration but still struggling. (tried both bringing the pin high, low, pullup on/off).
Could someone help me with this?
Ultimately I'd like to send a http command when the gpio 16 will go high due to PIR activation.
The rules I have now for testing are :
on switchon do
gpio 12,1
endon
on switchoff do
gpio 12,0
endon
on test#Switch do
if [test#Switch]=1
event switchon
else
event switchoff
endif
endon
Simple switch issues
Moderators: grovkillen, Stuntteam, TD-er
Re: Simple switch issues
Thanks a lot, I've seen similar topics to that based on which I also built the rules.
I'm still struggling, I think the issue is with triggering the switch on gpio 16. What I have not is a pushbutton soldered to ground, effectively grounding GPIO16 when I push the button, still the switch is still high.
Any ideas?
I'm still struggling, I think the issue is with triggering the switch on gpio 16. What I have not is a pushbutton soldered to ground, effectively grounding GPIO16 when I push the button, still the switch is still high.
Any ideas?
Re: Simple switch issues
I'm on ESP12E.
ok, eventually got it working.
The rule is as simple as this:
on Lightswitch#value do
SendToHTTP 192.168.2.4,39989,/cmd?a=motion_esp05_1
endon
The Switch is configured as pullup / reversed / push button active high and the gpio is connected to a PIR sensor. working absolutely fine for now.
ok, eventually got it working.
The rule is as simple as this:
on Lightswitch#value do
SendToHTTP 192.168.2.4,39989,/cmd?a=motion_esp05_1
endon
The Switch is configured as pullup / reversed / push button active high and the gpio is connected to a PIR sensor. working absolutely fine for now.
Who is online
Users browsing this forum: No registered users and 11 guests