The extension sidebar also contains some quick access functions. Click on the Pico icon in the side menu and you’ll see
Compile Project.
Hit Compile Project and a terminal tab will open at the bottom of the screen displaying the compilation progress.
4.1. Compile and Run blink
To run the blink example:
1. Hold down the BOOTSEL button on your Pico-series device while plugging it into your development device using a
micro USB cable to force it into USB Mass Storage Mode.
2. Press the Run button in the status bar or the Run project button in the sidebar.
You should see the terminal tab at the bottom of the window open. It will display information concerning the upload of
the code. Once the code uploads, the device will reboot, and you should see the following output:
The device was rebooted to start the application.
Your blink code is now running. If you look at your device, the LED should blink twice every second.
4.2. Make a Code Change and Re-run
To check that everything is working correctly, click on the blink.c file in VS Code. Navigate to the definition of
LED_DELAY_MS at the top of the code:
#ifndef LED_DELAY_MS
#define LED_DELAY_MS 250
#endif LED_DELAY_MS
1. Change the 250ms (a quarter of a second) to 100 (a tenth of a second):
#ifndef LED_DELAY_MS
#define LED_DELAY_MS 100
#endif LED_DELAY_MS
2. Disconnect your device, then reconnect while holding the BOOTSEL button.
3. Press the Run button in the status bar or the Run project button in the sidebar.
You should see the terminal tab at the bottom of the window open. It will display information concerning the upload of
the code. Once the code uploads, the device will reboot, and you should see the following output:
The device was rebooted to start the application.
Your blink code is now running. If you look at your device, the LED should flash faster, ten times every second.
Getting started with Raspberry Pi Pico-series
4.1. Compile and Run blink 9