timer issues when using ISR
Posted: Thu Jun 25, 2015 3:36 am
I'm working with a HC-SR04 ultrasonic sensor on an ESP-07. It runs at 5V, trigger directly connected to GPIO5 and echo via voltage divider to GPIO14.
As soon as I'll activate the ISR by gpio.trig(echo_pin, "up", echo_isr), instead of calling echo_isr() it instantly triggers all timer alerts (!?!?). For example, a 250ms timer alert suddenly finishes after ~0.5ms. This applies to all timer alerts, repeating or not, as long as the HC-SR04 is running and keeps echoing.
I'm using a custom build image (http://frightanic.com/nodemcu-custom-build). I'll post the code later.
Any known mistakes that would lead to this behaviour ?
Thanks alot,
Watz
As soon as I'll activate the ISR by gpio.trig(echo_pin, "up", echo_isr), instead of calling echo_isr() it instantly triggers all timer alerts (!?!?). For example, a 250ms timer alert suddenly finishes after ~0.5ms. This applies to all timer alerts, repeating or not, as long as the HC-SR04 is running and keeps echoing.
I'm using a custom build image (http://frightanic.com/nodemcu-custom-build). I'll post the code later.
Any known mistakes that would lead to this behaviour ?
Thanks alot,
Watz