When configuring the interrupt according to the code below, a single actuation on pin 23 has called the callback function more than 1 time, even without other activations on the pin.
This has happened with several pins. How do I execute the interruption only once per trigger?
MCU: ESP-WROOM-32 (ESP32D0WDQ6)
Firmware: MicroPython v1.12 (for ESP32 with IDF4, 2019.12.20) https://micropython.org/resources/firmw ... -v1.12.bin
IDE: Thonny Python IDE
OS: Windows 10 Home Single Language 2004
Code: Select all
from machine import Pin from time import sleep led = Pin(2, Pin.OUT) button = Pin(23, Pin.IN, Pin.PULL_DOWN) def callback(pin): led(1) sleep(1) led(0) sleep(1) button.irq(trigger=Pin.IRQ_RISING, handler=callback)