XIAO ESP32S3 + Micropython + User LED


I’m trying to turn on/off the user LED in Micropython. Have not been successful so far. Normally, I just do something like:

    led = machine.Pin(<PIN_NUMBER>, machine.Pin.OUT)

… but I don’t know what the PIN_NUMBER would be for the user led.

Anyone know?


Hello, you can read the pin picture here:Getting Started | Seeed Studio Wiki, the name of pin is here: if you wanna use the pin D2, you can see D2 match the GPIO3, so you can use it by “IO3”, such as machine.Pin(IO3,machine.Pin.OUT) or two lines like:

machine_pin= digitalio.DigitalInOut(board.IO3) 
machine_pin.direction = digitalio.Direction.OUTPUT