Here is some example code that worked for me working with the expansion board. If this causes an error for you I would try the latest firmware. I am on 9.2.b2.
Another trap for young players is that you cannot reference a variable in the global space directly from an interrupt callback so you need to create a class. The second example is how to get that working.
Example 1
from machine import Pin
import time
led = Pin('G16', mode=Pin.OUT)
def drip(p):
led.toggle()
print('pin change', p)
button = Pin('G17', mode=Pin.IN, pull=Pin.PULL_UP)
button.irq(trigger=Pin.IRQ_RISING, handler=drip)
Example 2
from machine import Pin
import time
class Drips:
pass
drips = Drips()
drips.count = 0
def drip(p):
drips.count+=1
button = Pin('G17', mode=Pin.IN, pull=Pin.PULL_UP)
button.irq(trigger=Pin.IRQ_RISING, handler=drip)