-->
Page 1 of 1

GPIO Set and Reset question

PostPosted: Tue Sep 19, 2017 9:59 am
by elektrolurch
Hi
I'm trying out my first ESP chip with my first program, so i think my question is easy for all but not for me.
I wrote the little following programm.
What I want, is to have two buttons to set two GPIO's.
The GPIO's glow up two Led's.
After ten seconds the GPIO's will be resetet and the Led's stop glowing.
In regular use the program works fine.
But when I push the second button during the glowing time of the other channel, the first Led (GPIO) was never resetet. and the Led still burns.
What is my mistake?
Thanks for all comments
By André
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