Getting Started with Seeed XIAO RP2040 with Projects
Getting Started Tutorial with Seeed Studio XIAO RP2040 Board with code for LED Blinking, DHT11, OLED with MicroPython & Arduino support
- Suitable forB.Tech/Diploma RPi Pico students
- Build time1-2 weeks
- LevelBeginner
- Available atAjvika Labs, Kakinada
About this project
Overview
This is a Getting Started tutorial on Seeed XIAO RP2040 Board from Seeed Studio. Recently Seeed Studio launched the world’s smallest RP2040 Board called XIAO RP2040 which is similar to Raspberry Pi Pico. Its signature values of high performance, low cost, ease of use, and tiny thumb size make it perfect for TinyML, smart wearable devices, and IoT projects.
The board size is similar to that of
XIAO BLE NRF52840
and
XIAO ESP32-C3
Board. Seeed Studio XIAO RP2040 has supported Arduino, MicroPython, and CircuitPython programming.
In this guide we will learn about the overview of the XIAO RP2040 Board along with its features, capabilities, pin details, and applications. First, we will go through basic usage like the blinking of LED and using the inbuilt Neopixel LED. Then we will control the LED blinking with the help of an analog pin & potentiometer. Later we will read the sensor value from DHT11 Sensor and also display some text on OLED Screen.
Bill of Materials
Purchase the following components from the given link if you wanna get started with XIAO RP2040 Board.
S.N.
Components
Quantity
Purchase Links
Seeed Studio RP2040 Board
Amazon
AliExpress
LED 5mm Any Color
Amazon
AliExpress
Resistor 200-ohm
Amazon
AliExpress
DHT11 Sensor
Amazon
AliExpress
0.96" I2C OLED Display
Amazon
AliExpress
Jumper Wires
Amazon
AliExpress
Breadboard
Amazon
AliExpress
Seeed Studio XIAO RP2040 Board
Seeed Studio XIAO RP2040 is an Arduino-compatible microcontroller featuring the Raspberry Pi Pico RP2040 chip. It carries the powerful Dual-core RP2040 processor that can flexible clock running up to 133 MHz which is a low-power microcontroller. The board also have 264KB of SRAM, and 2MB of onboard Flash memory which can provide more program to save and run. On the other hand, this little board has good performance in processing but needs less power.
The board is designed in a tiny size as small as a thumb(20×17.5mm) and can be used for wearable devices and small projects. There are 14 GPIO PINs on Seeed Studio XIAO RP2040, on which there are 11 digital pins, 4 analog pins, 11 PWM Pins,1 I2C interface, 1 UART interface, 1 SPI interface, and 1 SWD Bonding pad interface.
Seeed Studio XIAO RP2040 is friendly to the communities for its strong software compatibilities, which support Arduino, Micropython, and CircuitPython. Except for the software, flexible I/O allows it to speak to almost any external device. You can also use the Thonny editor to program as if you were using Raspberry Pi Pico. With two fast cores, plenty of on-chip RAM, and a port of TensorFlow Lite, RP2040 is a great platform for machine learning applications.
The top side of the Board has an RP2040 Chip embedded in the PCB. Like other boards, it has two buttons, one as a reset and the other as a boot button. It also has a red power LED & an on-board RGB LED. A Neopixel LED is also available on the Board which can be programmed. The Board has a type C USB interface for programming and Serial Communication.
Features
Powerful MCU: Dual-core ARM Cortex M0+ processor, flexible clock running up to 133 MHz
Rich on-chip resources: 264KB of SRAM, and 2MB of on-board Flash memory
Flexible compatibility: Support Micropython/Arduino/CircuitPython
Easy project operation: Breadboard-friendly & SMD design, no components on the back
Small size: As small as a thumb(20×17.5mm) for wearable devices and small projects.
Multiple interfaces: 11 digital pins, 4 analog pins, 11 PWM Pins,1 I2C interface, 1 UART interface, 1 SPI interface, 1 SWD Bonding pad interface.
Pinout
There are 14 GPIO PINs on Seeed Studio XIAO RP2040, on which there are 11 digital pins, 4 analog pins, 11 PWM Pins,1 I2C interface, 1 UART interface, 1 SPI interface, and 1 SWD Bonding pad interface.
The working voltage of the microcontroller is 3.3V. Voltage input connected to general I/O pins may cause chip damage if it is higher than 3.3V. The board can be powered via a 5V external power supply. The built-in DC-DC converter circuit able to change 5V voltage into 3.3V allows power to the device with a 5V supply via VIN-PIN and 5V-PIN.
Enter Bootloader Mode
Sometimes the Seeed Studio XIAO RP2040 port may disappear when the user programming process fails. we can solve this problem by the following operation:
Long press the “B” button.
Connect the Seeed Studio XIAO PR2040 to your computer.
The computer will appear as a disk driver.
At this point, the chip enters Bootloader mode and the burn port appears again. Because the RP2040 chip has two partitions, one is the Bootloader and the other is the user program. The product will burn a bootloader code in the system memory when it leaves the factory. We can switch modes by performing the above steps.
Reset
If you want to reset the Seeed Studio XIAO RP2040, perform the following steps:
Connect the Seeed Studio XIAO RP2040 to your computer.
Press the “R” pins once.
Please note
: The behavior of the built-in programmable Single-colour LEDs(two are blue, one is green) is reversed to the one on an Arduino. On the Seeed Studio XIAO RP2040, the pin has to be pulled low to enable it.
Getting Started with Seeed XIAO RP2040 Board
Before using XIAO RP2040 Board, we need to set up the Arduino IDE. The Arduino IDE doesn’t have a pre-installed XIAO RP2040 Board. So we need to install the board first.
First open your Arduino IDE & Navigate to
File > Preferences
, and fill “
Additional Boards Manager URLs
” with the url below:
https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
Navigate to
Tools > Board > Boards Manager
, type the keyword “
RP2040
” in the search box, select the latest version of and install it.
Once the board get installed, navigate to
Tools > Board > Seeed RP2040 Boards
and select “
Seeed XIAO RP2040
“.
Navigate to
Tools > Port
and select the serial port name of the connected
Seeed XIAO RP2040
Now your Board is ready for programming and starting the project.
Blinking of LED
The first program we are going to implement is the blinking of LED. The board has on-board RGB LED connected to Pin 25. We will use the example code to blink the LED for 1 second.
Source Code/Program
Copy the following code and upload it to the RP2040 Board.
// the setup function runs once when you press reset or power the board
void
setup
(
)
{
// initialize digital pin LED_BUILTIN as an output.
pinMode
(
LED_BUILTIN
OUTPUT
)
;
}
// the loop function runs over and over again forever
void
loop
(
)
{
digitalWrite
(
LED_BUILTIN
HIGH
)
;
// turn the LED on (HIGH is the voltage level)
delay
(
5000
)
;
// wait for a second
digitalWrite
(
LED_BUILTIN
LOW
)
;
// turn the LED off by making the voltage LOW
delay
(
2000
)
;
// wait for a second
}
Once uploaded, you should be able to see the pin 25 Green (USER) LED on the board blinks once a second. If it does, congratulations!
This means the connection is successful and now you can explore more projects with the Seeed Studio XIAO RP2040!
Nexopixel RGB LED Usage
The Pin 11 of the XIAO RP2040 Board is the enable pin of RGB LED. You can light up the RGB LED by setting the Pin 11 high. Here we are going to make it go flash. First, we need to add a third-party library.
Open Arduino IDE, navigate to Sketch > Include Library > Manage Libraries; to search the library. Type the keyword “
Adafruit_NeoPixel
” library in Ardunio library Manager and install the latest version.
Source Code/Program
Now Copy the following code to Arduino IDE and click the Upload button to upload.
#include <Adafruit_NeoPixel.h>
int
Power
=
;
int
PIN
=
;
#define NUMPIXELS 1
Adafruit_NeoPixel
pixels
(
NUMPIXELS
PIN
NEO_GRB
+
NEO_KHZ800
)
;
void
setup
(
)
{
pixels
begin
(
)
;
pinMode
(
Power
OUTPUT
)
;
digitalWrite
(
Power
HIGH
)
;
}
void
lo
This is a Getting Started tutorial on Seeed XIAO RP2040 Board from Seeed Studio. Recently Seeed Studio launched the world’s smallest RP2040 Board called XIAO RP2040 which is similar to Raspberry Pi Pico. Its signature values of high performance, low cost, ease of use, and tiny thumb size make it perfect for TinyML, smart wearable devices, and IoT projects.
The board size is similar to that of
XIAO BLE NRF52840
and
XIAO ESP32-C3
Board. Seeed Studio XIAO RP2040 has supported Arduino, MicroPython, and CircuitPython programming.
In this guide we will learn about the overview of the XIAO RP2040 Board along with its features, capabilities, pin details, and applications. First, we will go through basic usage like the blinking of LED and using the inbuilt Neopixel LED. Then we will control the LED blinking with the help of an analog pin & potentiometer. Later we will read the sensor value from DHT11 Sensor and also display some text on OLED Screen.
Bill of Materials
Purchase the following components from the given link if you wanna get started with XIAO RP2040 Board.
S.N.
Components
Quantity
Purchase Links
Seeed Studio RP2040 Board
Amazon
AliExpress
LED 5mm Any Color
Amazon
AliExpress
Resistor 200-ohm
Amazon
AliExpress
DHT11 Sensor
Amazon
AliExpress
0.96" I2C OLED Display
Amazon
AliExpress
Jumper Wires
Amazon
AliExpress
Breadboard
Amazon
AliExpress
Seeed Studio XIAO RP2040 Board
Seeed Studio XIAO RP2040 is an Arduino-compatible microcontroller featuring the Raspberry Pi Pico RP2040 chip. It carries the powerful Dual-core RP2040 processor that can flexible clock running up to 133 MHz which is a low-power microcontroller. The board also have 264KB of SRAM, and 2MB of onboard Flash memory which can provide more program to save and run. On the other hand, this little board has good performance in processing but needs less power.
The board is designed in a tiny size as small as a thumb(20×17.5mm) and can be used for wearable devices and small projects. There are 14 GPIO PINs on Seeed Studio XIAO RP2040, on which there are 11 digital pins, 4 analog pins, 11 PWM Pins,1 I2C interface, 1 UART interface, 1 SPI interface, and 1 SWD Bonding pad interface.
Seeed Studio XIAO RP2040 is friendly to the communities for its strong software compatibilities, which support Arduino, Micropython, and CircuitPython. Except for the software, flexible I/O allows it to speak to almost any external device. You can also use the Thonny editor to program as if you were using Raspberry Pi Pico. With two fast cores, plenty of on-chip RAM, and a port of TensorFlow Lite, RP2040 is a great platform for machine learning applications.
The top side of the Board has an RP2040 Chip embedded in the PCB. Like other boards, it has two buttons, one as a reset and the other as a boot button. It also has a red power LED & an on-board RGB LED. A Neopixel LED is also available on the Board which can be programmed. The Board has a type C USB interface for programming and Serial Communication.
Features
Powerful MCU: Dual-core ARM Cortex M0+ processor, flexible clock running up to 133 MHz
Rich on-chip resources: 264KB of SRAM, and 2MB of on-board Flash memory
Flexible compatibility: Support Micropython/Arduino/CircuitPython
Easy project operation: Breadboard-friendly & SMD design, no components on the back
Small size: As small as a thumb(20×17.5mm) for wearable devices and small projects.
Multiple interfaces: 11 digital pins, 4 analog pins, 11 PWM Pins,1 I2C interface, 1 UART interface, 1 SPI interface, 1 SWD Bonding pad interface.
Pinout
There are 14 GPIO PINs on Seeed Studio XIAO RP2040, on which there are 11 digital pins, 4 analog pins, 11 PWM Pins,1 I2C interface, 1 UART interface, 1 SPI interface, and 1 SWD Bonding pad interface.
The working voltage of the microcontroller is 3.3V. Voltage input connected to general I/O pins may cause chip damage if it is higher than 3.3V. The board can be powered via a 5V external power supply. The built-in DC-DC converter circuit able to change 5V voltage into 3.3V allows power to the device with a 5V supply via VIN-PIN and 5V-PIN.
Enter Bootloader Mode
Sometimes the Seeed Studio XIAO RP2040 port may disappear when the user programming process fails. we can solve this problem by the following operation:
Long press the “B” button.
Connect the Seeed Studio XIAO PR2040 to your computer.
The computer will appear as a disk driver.
At this point, the chip enters Bootloader mode and the burn port appears again. Because the RP2040 chip has two partitions, one is the Bootloader and the other is the user program. The product will burn a bootloader code in the system memory when it leaves the factory. We can switch modes by performing the above steps.
Reset
If you want to reset the Seeed Studio XIAO RP2040, perform the following steps:
Connect the Seeed Studio XIAO RP2040 to your computer.
Press the “R” pins once.
Please note
: The behavior of the built-in programmable Single-colour LEDs(two are blue, one is green) is reversed to the one on an Arduino. On the Seeed Studio XIAO RP2040, the pin has to be pulled low to enable it.
Getting Started with Seeed XIAO RP2040 Board
Before using XIAO RP2040 Board, we need to set up the Arduino IDE. The Arduino IDE doesn’t have a pre-installed XIAO RP2040 Board. So we need to install the board first.
First open your Arduino IDE & Navigate to
File > Preferences
, and fill “
Additional Boards Manager URLs
” with the url below:
https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
Navigate to
Tools > Board > Boards Manager
, type the keyword “
RP2040
” in the search box, select the latest version of and install it.
Once the board get installed, navigate to
Tools > Board > Seeed RP2040 Boards
and select “
Seeed XIAO RP2040
“.
Navigate to
Tools > Port
and select the serial port name of the connected
Seeed XIAO RP2040
Now your Board is ready for programming and starting the project.
Blinking of LED
The first program we are going to implement is the blinking of LED. The board has on-board RGB LED connected to Pin 25. We will use the example code to blink the LED for 1 second.
Source Code/Program
Copy the following code and upload it to the RP2040 Board.
// the setup function runs once when you press reset or power the board
void
setup
(
)
{
// initialize digital pin LED_BUILTIN as an output.
pinMode
(
LED_BUILTIN
OUTPUT
)
;
}
// the loop function runs over and over again forever
void
loop
(
)
{
digitalWrite
(
LED_BUILTIN
HIGH
)
;
// turn the LED on (HIGH is the voltage level)
delay
(
5000
)
;
// wait for a second
digitalWrite
(
LED_BUILTIN
LOW
)
;
// turn the LED off by making the voltage LOW
delay
(
2000
)
;
// wait for a second
}
Once uploaded, you should be able to see the pin 25 Green (USER) LED on the board blinks once a second. If it does, congratulations!
This means the connection is successful and now you can explore more projects with the Seeed Studio XIAO RP2040!
Nexopixel RGB LED Usage
The Pin 11 of the XIAO RP2040 Board is the enable pin of RGB LED. You can light up the RGB LED by setting the Pin 11 high. Here we are going to make it go flash. First, we need to add a third-party library.
Open Arduino IDE, navigate to Sketch > Include Library > Manage Libraries; to search the library. Type the keyword “
Adafruit_NeoPixel
” library in Ardunio library Manager and install the latest version.
Source Code/Program
Now Copy the following code to Arduino IDE and click the Upload button to upload.
#include <Adafruit_NeoPixel.h>
int
Power
=
;
int
PIN
=
;
#define NUMPIXELS 1
Adafruit_NeoPixel
pixels
(
NUMPIXELS
PIN
NEO_GRB
+
NEO_KHZ800
)
;
void
setup
(
)
{
pixels
begin
(
)
;
pinMode
(
Power
OUTPUT
)
;
digitalWrite
(
Power
HIGH
)
;
}
void
lo
Technologies used
Hardware components
- ESP32
- Arduino
- Raspberry Pi
- DHT11
- OLED
- NeoPixel
Software & tools
- Arduino IDE
- Thonny
- MicroPython
What you get
- Working project / hardware kit, tested before delivery
- Complete source code with explanation
- Project demo and guidance for your viva
- Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed.
Payment is in two parts:
• 50% advance to start the project
• Remaining 50% before delivery
Note:
• Documentation and PPT are not included by default
• If you need documentation/PPT, it can be arranged for extra time and cost
We'll confirm the exact timeline and cost with you after reviewing your requirements.