Traceback (most recent call last):
File "", line 13, in
AttributeError: 'Pin' object has no attribute 'irq'
�>
MicroPython ESP32_LoBo_v3.2.24 - 2018-09-06 on ESP32 board with ESP32
Type "help()" for more information.
Video: Learn MicroPython #4 - Interrupts
from machine import Pin
led = Pin(33, Pin.OUT)
btn = Pin(37, Pin.IN)
def my_func(pin):
print("rising!")
Interrupt Request
btn.irq(my_func, Pin.IRQ_RISING)