XIAO RP2040 with PlatformIO

PlatformIO Introduce
PlatformIO is a development platform that integrates many types of development boards and has good scalability. If the platform does not have the type you need, you can manually add the type of development board yourself. The code you write on Arduino can use it, just add the corresponding library.
In this wiki, we wiil introduce how to install and run the sample code in PlatformIO.
Use PlatformIO For XIAO RP2040
Setup 1 . SteDownload VS Code
Download according to the system you are using VS Code

Setup 2 . Install the PlatformIO extension
Open VSCode, click on Extensions, then search for PlatformIO and select to install. After the installation is complete, restart VSCode.

Setup 3 . Install the platform-seeedboards platform package
The Seeed Studio XIAO series boards use a custom PlatformIO platform, so you need to install the corresponding platform package manually.
- Run the following command for a fresh installation:
pio pkg install -g -p "https://github.com/Seeed-Studio/platform-seeedboards.git"

- If you have previously used Seeed Studio XIAO series boards in PlatformIO, run the command below to update:
pio pkg uninstall -g -p "SeeedStudio"
pio pkg install -g -p "SeeedStudio=https://github.com/Seeed-Studio/platform-seeedboards.git" --force
Alternatively, you can perform replacements based on existing projects.
[env:seeed_xiao_rp2040]
platform = https://github.com/Seeed-Studio/platform-seeedboards.git
board = seeed-xiao-rp2040
framework = arduino
Setup 4 . Create any project in PlatformIO
Open the PlatformIO extension and select Create New Project.

Setup 4 . Compile and Burn
Copy the following program into main.c and upload it to the board.
#include <Arduino.h>
void setup() {
pinMode(PIN_LED, OUTPUT);
}
void loop() {
digitalWrite(PIN_LED, HIGH);
delay(1000);
digitalWrite(PIN_LED, LOW);
delay(1000);
}

Tech Support & Product Discussion
Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.