So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By elektrolurch
#70101 Hi
I´m new here because i`m testing an ESP8266 at first time.

My first programm should set and reset two pins, so the leds will flash.
Here is is my short programm.
When I push one of the two buttons, the Led will glow and after ten seconds it will stop glowing.
So far so good, this works fine.
My Problem is, when push the button of Led 2 during the glowing of Led 1 ,the Programm works not correct. What happens?
Led 1 is glowing, after some Seconds(10) the Led 2 will glow too and stop glowing after 10 seconds.
But the Led 1 never stops glowing.
Now my Question is why?
I hope you undestand me, because my english is not good. :-(
Code: Select all[top]
button "Exit", [getMeOutOfHere]
button "Rot 15", [blinkRot]
button "Gruen 14", [blinkGruen]
wait

[blinkRot]
io(po,15,1)
delay 10000
io(po,15,0)
wait

[blinkGruen]
io(po,14,1)
delay 10000
io(po,14,0)
wait

[getMeOutOfHere]
end