Answer the question
In order to leave comments, you need to log in
How to handle change event on esp8266 GPIO?
There is esp2688. It seems like a simple task, without using an arduino. Only esp 2688.
You need to send request A when receiving a pulse on gpio0. those. momentary level change to gpio0.
and request B when receiving a pulse on gpio1 on gpio1.
And then wait for the next. either of the two impulses.
Actually, as far as I understood the so-called. there are no interrupts in esp 2688.
maybe some kind of tricky move will help?
PS impulse from water sensors.
Answer the question
In order to leave comments, you need to log in
Using nodemcu:
In fact, this is the processing of a button press, already with bounce protection.
local pin = 4 --> GPIO2
function debounce (func)
local last = 0
local delay = 200000
return function (...)
local now = tmr.now()
if now - last < delay then return end
last = now
return func(...)
end
end
function onChange ()
print('The pin value has changed to '..gpio.read(pin))
end
Actually, as far as I understood the so-called. there are no interrupts in esp 2688.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question