-->
Page 1 of 1

Gpio.Trig - double pulse.

PostPosted: Wed Dec 02, 2015 3:57 am
by dise
Hello Dear Friends. I Use Hall Sensor ( AH49E from Waveshare) connected D0 to GPIO2 on Esp8266-01.
Below code is doubling counts i don' know why, i just want one pulse on trig when its up... but it counts second up when pulse is longer than 1 or 2 seconds.... very strange.

I use nodemcu_float_0.9.6-dev_20150704.

Code: Select allfunction gasInterrupt()
    print("Gaspuls Detected")
    PulseGas = PulseGas + GasCounterValue
    tmr.delay(10000)
    print(PulseGas)
   end
end


and

Code: Select allgpio.mode(pin, gpio.INT)
gpio.trig(pin, "up", gasInterrupt)