Welcome to Raspberry Pi Pico 2 repository
3. Download a program
3. Download a program
Looking at the pin diagram of Pico 2, we know that the control pin of the onboard LED of Pico 2 is GPIO25. Here we try to control the onboard LED.
Check if there is text similar to the following in the Shell box. If not, it may be that the port is not selected. Check if the port is recognized in the device manager and whether the compiler is installed in the previous tutorial to select the port.
After the check, write the code to thonny and click the green button Run to run the program
After that, you can see that the LED light on the Pico 2 board is lit.
You can also enter the following code in the shell window
>>> from machine import Pin>>> led = Pin(25, Pin.OUT)>>> led.value(1)