Comments on: MicroPython: Interrupts with ESP32 and ESP8266 https://randomnerdtutorials.com/micropython-interrupts-esp32-esp8266/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Fri, 09 Jun 2023 21:27:46 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Joe https://randomnerdtutorials.com/micropython-interrupts-esp32-esp8266/#comment-839757 Fri, 09 Jun 2023 21:27:46 +0000 https://randomnerdtutorials.com/?p=81978#comment-839757 In reply to Vardhan Batavia.

Can you show a code example of how that would be applied in this interrupts example ?

]]>
By: Juan https://randomnerdtutorials.com/micropython-interrupts-esp32-esp8266/#comment-571226 Sat, 13 Mar 2021 20:44:29 +0000 https://randomnerdtutorials.com/?p=81978#comment-571226 Hi people. Can NodeMcu 32 work with UART interrupts ??? May I use UART.IRQ (…)???
I can’t find how to do that..
Thanks .. !

]]>
By: Vardhan Batavia https://randomnerdtutorials.com/micropython-interrupts-esp32-esp8266/#comment-522307 Thu, 26 Nov 2020 06:49:37 +0000 https://randomnerdtutorials.com/?p=81978#comment-522307 In reply to Mark.

you can add 200 ms of delay in ISR function before enabling using machine.enable_irq(state)
that will prevent interrupt to occur again and again.

Regards
Vardhan

]]>
By: Vardhan https://randomnerdtutorials.com/micropython-interrupts-esp32-esp8266/#comment-522306 Thu, 26 Nov 2020 06:48:50 +0000 https://randomnerdtutorials.com/?p=81978#comment-522306 you can add 200 ms of delay in ISR function before enabling using machine.enable_irq(state)
that will prevent interrupt to occur again and again.

]]>
By: Sara Santos https://randomnerdtutorials.com/micropython-interrupts-esp32-esp8266/#comment-418788 Fri, 03 Jan 2020 11:47:22 +0000 https://randomnerdtutorials.com/?p=81978#comment-418788 In reply to Brian Hambleton.

Hi Brian.
There are 3 different conditions:
Pin.IRQ_FALLING: to trigger the interrupt whenever the pin goes from HIGH to LOW;
Pin.IRQ_RISING: to trigger the interrupt whenever the pin goes from LOW to HIGH.
3: to trigger the interrupt in both edges (this means, when any change is detected)

So, yes. It supports both at the same time.
Regards,
Sara

]]>
By: Brian Hambleton https://randomnerdtutorials.com/micropython-interrupts-esp32-esp8266/#comment-418600 Thu, 02 Jan 2020 16:56:53 +0000 https://randomnerdtutorials.com/?p=81978#comment-418600 Does Micro-Python support interrupt on ‘both’ rising and falling edge? I am sensing a damper in my HVAC system to monitor blower on off. Rising edge = timestamp start of blower cycle, falling edge = timestamp end of blower cycle. Can I do this with one input or do I need to use two inputs one for rising one for falling?

]]>
By: Mark https://randomnerdtutorials.com/micropython-interrupts-esp32-esp8266/#comment-414190 Wed, 11 Dec 2019 11:55:31 +0000 https://randomnerdtutorials.com/?p=81978#comment-414190 On a somewhat related topic, has anyone (else) had issues with debounce on the ESP32 with reed switches? I’m using an anemometer with a reed switch to fire an interrupt, and for some reason every time I get a falling edge interrupt (I’ve got the GPIO pin held high), it triggers between 1 and 4 interrupts. I’m using an adafruit HUZZAH32, and GPIO21.

]]>
By: Sara Santos https://randomnerdtutorials.com/micropython-interrupts-esp32-esp8266/#comment-358750 Tue, 12 Mar 2019 16:05:25 +0000 https://randomnerdtutorials.com/?p=81978#comment-358750 In reply to Seth C Stenzel.

Hi Seth.
Yes, I think you can, but I haven’t tried it yet.
It seems that you can pass a wake parameter when defining the interrupt and it can be:
– machine.IDLE
– machine.SLEEP
– machine.DEEPSLEEP

See more information here:
docs.micropython.org/en/v1.8.7/esp8266/library/machine.Pin.html?highlight=pin#machine.Pin.irq

Regards,
Sara

]]>
By: Seth C Stenzel https://randomnerdtutorials.com/micropython-interrupts-esp32-esp8266/#comment-358518 Mon, 11 Mar 2019 19:50:38 +0000 https://randomnerdtutorials.com/?p=81978#comment-358518 Would it be possible to wake the esp32 from deepsleep with these interrupts?

]]>