I'm very new to micropython and jumped in by purchasing a pyboard d-series (SF2W) to use as a learning tool for python in general. Currently I'm experiencing an issue with setting up an pushbutton to trigger an external interrupt. So far, I'm not having any luck following the official documentation. the code I'm using is very simple as this was just to test the functionality.
Code: Select all
from pyb import ExtInt, Pin, LED led = LED(1) #Wired the button between pin 'X6' and the X GND ex1 = ExtInt('X6', ExtInt.IRQ_FALLING, Pin.PULL_UP, led.toggle())