Close Menu
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
Facebook X (Twitter) Instagram
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn
How To Electronics
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
How To Electronics
Home » Getting Started with Seeed XIAO RP2040 with Projects
Raspberry Pi Raspberry Pi Pico Projects

Getting Started with Seeed XIAO RP2040 with Projects

Mamtaz AlamBy Mamtaz AlamUpdated:October 21, 20221 Comment8 Mins Read
Share Facebook Twitter LinkedIn Telegram Reddit WhatsApp
Seeed XIAO RP2040
Share
Facebook Twitter LinkedIn Pinterest Email Reddit Telegram WhatsApp

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.

XIAO RP2040 vs Raspberry Pi Pico

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.ComponentsQuantityPurchase Links
1Seeed Studio RP2040 Board1Amazon | AliExpress
2LED 5mm Any Color1Amazon | AliExpress
3Resistor 200-ohm1Amazon | AliExpress
4DHT11 Sensor1Amazon | AliExpress
50.96" I2C OLED Display1Amazon | AliExpress
6Jumper Wires10Amazon | AliExpress
7Breadboard1Amazon | AliExpress




Seeed Studio XIAO RP2040 Board

Seeed XIAO RP2040

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.

RP2040 Board Overview

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.

Seeed XIAO RP2040 Pinout

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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!

LED Blink XIAO RP2040

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <Adafruit_NeoPixel.h>
int Power = 11;
int PIN  = 12;
#define NUMPIXELS 1
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup()
{
  pixels.begin();
  pinMode(Power,OUTPUT);
  digitalWrite(Power, HIGH);
}
void loop() {
  pixels.clear();
  pixels.setPixelColor(0, pixels.Color(15, 25, 205));
  delay(400);
  pixels.show();
  pixels.clear();
  pixels.setPixelColor(0, pixels.Color(103, 25, 205));
  delay(400);
  pixels.show();
  pixels.clear();
  pixels.setPixelColor(0, pixels.Color(233, 242, 205));
  delay(400);
  pixels.show();
  pixels.clear();
  pixels.setPixelColor(0, pixels.Color(233, 23, 23));
  delay(400);
  pixels.show();
  pixels.clear();
  pixels.setPixelColor(0, pixels.Color(12, 66, 101));
  delay(400);
  pixels.show();
  delay(500);
}

Once the code is uploaded, the RGB will display the rainbow color.



Analog Pin Usgae to control LED

Now lets see how we can use the Analog Pin of XIAO RP2040 Board to control the LED. For this connect the potentiometer to an A0 pin and a 5mm LED to pin27 via 200-ohm resistor.

I used a breadboard for Assembly. You also design your custom PCB for this part.

XIAO RP2040 Potentiometer LED


Source Code/Program

Upload the following code to control the blinking interval of the LED by rotating the potentiometer knob.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const int sensorPin = A0;
const int ledPin =  27;
 
 
void setup()
{
  // declare the ledPin as an OUTPUT:
  pinMode(sensorPin, INPUT);
  pinMode(ledPin, OUTPUT);
}
 
 
void loop()
{
  // read the value from the sensor:
  int sensorValue = analogRead(sensorPin);
  // turn the ledPin on
  digitalWrite(ledPin, HIGH);
  // stop the program for <sensorValue> milliseconds:
  delay(sensorValue);
  // turn the ledPin off:
  digitalWrite(ledPin, LOW);
  // stop the program for for <sensorValue> milliseconds:
  delay(sensorValue);
}


DHT11 Sensor with RP2040

Now lets connect a DHT11 Sensor to XIAO RP2040 Board. Connect the VCC, GND & output pin of the DHT11 Sensor to the 3.3V, GND and pin 27 of the XIAO Board.

I used a simple breadboard connection again as shown in the image below.


Source Code/Program

The code requires DHT11 Sensor library. Open Arduino IDE, navigate to Sketch > Include Library > Manage Libraries; to search the library. Type the keyword “DHT11” library in Ardunio library Manager and install the latest version.

Copy the following code to Arduino IDE and click the Upload button to upload.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "DHT.h"
#define DHTPIN 27     // Digital pin connected to the DHT sensor
#define DHTTYPE DHT11   // DHT 11
DHT dht(DHTPIN, DHTTYPE);
void setup()
{
  Serial.begin(115200);
  Serial.println(F("DHTxx test!"));
  dht.begin();
  delay(2000);
}
void loop()
{
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  // Check if any reads failed and exit early (to try again).
  if (isnan(h) || isnan(t))
  {
    Serial.println(F("Failed to read from DHT sensor!"));
    return;
  }
  Serial.print(F("Humidity: "));
  Serial.print(h);
  Serial.println("%");
  Serial.print(F("Temperature: "));
  Serial.print(t);
  Serial.println(F("°C "));
  Serial.println("");
  delay(2000);
}

After the code is uploaded, open the Serial Monitor. You can see the humidity and temperature data on Serial Monitor.




OLED Display with RP2040

Here we are going to connect the XIAO RP2040 Board with OLED Display 0.96″ through I2C pins and display “Hello world”.

XIAO RP2040 OLED

We are going use PIN 5 as the SCL pin and PIN 4 as the SDA pin.

XIAO RP2040 SSD1306 OLED


Source Code/Program

Open Arduino IDE, navigate to Sketch > Include Library > Manage Libraries to search the library. Type the keyword “U8G2” library in Ardunio library Manager and install the lastest version.

Copy the following code to Arduino IDE and click the Upload button to upload.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <Arduino.h>
#include <U8g2lib.h>
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);
void setup(void) {
  u8g2.begin();
}
void loop(void) {
  u8g2.clearBuffer();                   // clear the internal memory
  u8g2.setFont(u8g2_font_ncenB08_tr);   // choose a suitable font
  u8g2.drawStr(0,10,"Hello Wrold!");    // write something to the internal memory
  u8g2.drawStr(0,30,"Hello Werold!");
  u8g2.drawStr(0,50,"Hello Wrrrold!");
  u8g2.sendBuffer();                    // transfer internal memory to the display
  delay(1000);  
}

Results are shown as:


Video Tutorial & Guide

Getting Started with Seeed XIAO RP2040 Board with Projects | World Smallest Raspberry Pi Pico Board
Watch this video on YouTube.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit Telegram WhatsApp
Previous ArticleFull Wave Rectifier Basics, Circuit, Working & Applications
Next Article GSM Based Water Level Monitoring System with Arduino

Related Posts

ADXL375 Accelerometer with Raspberry Pi Pico & MicroPython

ADXL375 Accelerometer with Raspberry Pi Pico & MicroPython

Updated:July 24, 2025
Interface BMI160 with Raspberry Pi Pico & MicroPython

Interface BMI160 with Raspberry Pi Pico & MicroPython

Updated:February 2, 20253K
Shift Register 74HC595 with Raspberry Pi Pico & MicroPython

Shift Register 74HC595 with Raspberry Pi Pico & MicroPython

Updated:February 2, 202513K
Interfacing XBee Module with Raspberry Pi Pico & MicroPython

Interfacing XBee Module with Raspberry Pi Pico & MicroPython

Updated:February 2, 20253K
Modbus RTU with Raspberry Pi Pico & Micropython

Modbus RTU with Raspberry Pi Pico & MicroPython

Updated:February 2, 20258K
Fever Detector with MLX90640 & OpenCV Raspberry Pi

Thermal Fever Detector with MLX90640 & OpenCV Raspberry Pi

Updated:February 2, 20256K
View 1 Comment

1 Comment

  1. Frank De Bruyne on May 15, 2023 6:13 AM

    Any experience with the Xiao and Modbus, using the Max3485 chip and MdbusRtu library

    Reply

CommentsCancel reply

Latest Posts
ESP32 Fingerprint Attendance System with Live Web Dashboard

ESP32 Fingerprint Attendance System with Live Web Dashboard

June 16, 2026
IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

June 14, 2026
DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

May 10, 2026
IoT Activity Tracker with ESP32 & Accelerometer Gyroscope

IoT Activity Tracker with ESP32 & Accelerometer/Gyroscope

May 2, 2026
A Guide to Sourcing Obsolete ICs for Vintage Projects

Beyond AliExpress: A Guide to Sourcing Obsolete ICs for Vintage Projects

April 21, 2026

ESP32 IoT Vehicle Motion Analyzer with MPU6050 & LIS3MDL

April 27, 2026
Building a Smart Sensor Node with a BLE Microcontroller

Building a Smart Sensor Node with a BLE Microcontroller

February 26, 2026
High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

April 27, 2026
Top Posts & Pages
  • ESP32 Fingerprint Attendance System with Live Web Dashboard
    ESP32 Fingerprint Attendance System with Live Web Dashboard
  • IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
    IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
  • 12V DC to 220V AC Inverter Circuit & PCB
    12V DC to 220V AC Inverter Circuit & PCB
  • How to use ADS1115 16-Bit ADC Module with Arduino
    How to use ADS1115 16-Bit ADC Module with Arduino
  • Buck Converter: Basics, Working, Design & Application
    Buck Converter: Basics, Working, Design & Application
  • Interfacing PN532 NFC RFID Module with Arduino
    Interfacing PN532 NFC RFID Module with Arduino
  • IoT Based ECG Monitoring with AD8232 ECG Sensor & ESP32
    IoT Based ECG Monitoring with AD8232 ECG Sensor & ESP32
  • IoT Based PM & Air Quality Monitoring System using ESP32
    IoT Based PM & Air Quality Monitoring System using ESP32
Categories
  • Arduino Projects (197)
  • Articles (60)
    • Learn Electronics (19)
    • Product Review (15)
    • Tech Articles (28)
  • Electronics Circuits (46)
    • 555 Timer Projects (21)
    • Op-Amp Circuits (7)
    • Power Electronics (13)
  • IoT Projects (205)
    • ESP32 MicroPython (7)
    • ESP32 Projects (82)
    • ESP32-CAM Projects (15)
    • ESP8266 Projects (76)
    • LoRa/LoRaWAN Projects (22)
  • Microcontrollers (38)
    • AMB82-Mini IoT AI Camera (4)
    • BLE Projects (18)
    • STM32 Projects (19)
  • Raspberry Pi (93)
    • Raspberry Pi Pico Projects (57)
    • Raspberry Pi Pico W Projects (12)
    • Raspberry Pi Projects (24)
Follow Us
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
About Us

“‘How to Electronics’ is a vibrant community for electronics enthusiasts and professionals. We deliver latest insights in areas such as Embedded Systems, Power Electronics, AI, IoT, and Robotics. Our goal is to stimulate innovation and provide practical solutions for students, organizations, and industries. Join us to transform learning into a joyful journey of discovery and innovation.

Copyright © How To Electronics. All rights reserved.
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us

Type above and press Enter to search. Press Esc to cancel.

Ad Blocker Enabled!
Ad Blocker Enabled!
Looks like you're using an ad blocker. Please allow ads on our site. We rely on advertising to help fund our site.