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 BLE nRF52840 Sense
BLE Projects

Getting Started with Seeed XIAO BLE nRF52840 Sense

Mamtaz AlamBy Mamtaz AlamUpdated:November 26, 20247 Mins Read
Share Facebook Twitter LinkedIn Telegram Reddit WhatsApp
Seeed XIAO BLE nRF52840 Sense
Share
Facebook Twitter LinkedIn Pinterest Email Reddit Telegram WhatsApp

Overview

In this getting started tutorial, we will learn about the latest Seeed XIAO BLE nRF52840 Sense Board from Seeedstudio. Recently they launched 2 boards based on Nordic nRF52840 BLE 5.2 Chip from Nordic Semiconductor. One of the board is called as Seeed XIAO BLE nRF52840 and other as Seeed XIAO BLE nRF52840 Sense.

The Seeed XIAO BLE is an ultra-small size, ultra-low power Bluetooth development board based on the Nordic nRF52840. It features an onboard Bluetooth antenna, and onboard battery charging chip which makes it ideal for IoT projects. Similarly, Seeed XIAO BLE nRF52840 Sense is a tiny Bluetooth BLE development board designed for IoT and AI applications. It features an onboard antenna, 6 Dof IMU, and microphone, all of which make it an ideal board to run AI using TinyML and TensorFlow Lite.

Earlier, we learned about Makerfabs nRF52840 Board which is little large board. But Seeed XIAO BLE nRF52840 is a simplified board.

This tutorial covers following parts:

  • Learn about the differences between XIAO BLE nRF52840 and XIAO BLE nRF52840 Sense
  • Go through the Board design, Pins Description & Functions
  • Setup Arduino IDE to use nRF52840 Board
  • Writing an Arduino Code to Blink an LED
  • Learning how to use ADC Pin to control Light Intensity
  • Reading Temperature & Humidity Value from DHT11 Sensor
  • Displaying text on 0.96″ I2C OLED Display




Seeed XIAO BLE nRF52840 (Sense)

The Seeed XIAO BLE is developed from a powerful Nordic nRF52840 microcontroller which is designed in a Bluetooth 5.2 chipset. The chip is built around a 32-bit ARM® Cortex™-M4 CPU with a Floating-Point Unit(FPU) operating at 64Mhz. The best part about this module is it only consumes 5 μA in the deep sleep model. The board has a BQ25101 chip that supports battery charge management. To better support IoT and TinyML AI projects, there is an advanced version “Seeed XIAO BLE Sense” that carries both 6-axis IMU and PDM microphones.

Seeed XIAO BLE nRF52840 Sense

The board has a tiny and elegant reset button on one side of the Type-C interface. On the other side, it is designed in a three-in-one LED along with power LED. There are 11 digital i/o that can be used as PWM pins and 6 analog i/o that can be used as ADC pins. It supports UART, IIC, and SPI all three common serial ports. The board has onboard 2 MB flash which means it can also be programmed by Arduino, MicroPython, and CircuitPython. The board supports Near Field Communication(NFC).


Specifications

  • Powerful CPU: Nordic nRF52840, ARM® Cortex™-M4 32-bit processor with FPU operating at 64 MHz
  • Wireless capabilities: Bluetooth 5.0, NFC, and ZigBee module with onboard antenna
  • Ultra-small size: 21 x 17.5mm, Seeed Xiao series classic form-factor for wearable devices
  • Ultra-low sleep power: 5 μA, deep sleep model
  • Battery charging chip: BQ25101 chip supported lithium battery charge management
  • Rich interface: 1x Reset button, Ix UART, 1x IIC, 1x SPI, 1x NFC, 1x SWD, 11x GPIO, 6x ADC, 1x Three-in-one LED,1x User LED
  • Onboard 2 MB flash
  • Onboard PDM microphone and 6-axis IMU (only for XIAO BLE nRF52840 Sense)
  • Single-sided components, surface mounting design



Seeed XIAO BLE nRF52840 VS Seeed XIAO BLE nRF52840 Sense

Item Seeed XIAO BLE – nRF52840 Seeed XIAO BLE Sense – nRF52840
  Processor   Nordic nRF52840   The same as XIAO BLE
  ARM® Cortex®-M4 with FPU run up to 64 MHz
  Wireless   Bluetooth 5.0/NFC/Zigbee   The same as XIAO BLE
  On-chip Memory   1 MB flash and 256 kB RAM   The same as XIAO BLE
  Onboard Memory   2 MB QSPI flash   The same as XIAO BLE
  Interface   1xUART, 1xIIC, 1xSPI, 1xNFC, 1xSWD,   The same as XIAO BLE
  11xGPIO(PWM), 6xADC
  Sensors   Onboard PDM digital microphone
  Onboard 6-axis IMU
  Dimensions   21 x 17.5mm   The same as XIAO BLE
   Power   Circuit operating voltage: 3.3V@200mA   The same as XIAO BLE
  Charging current: 50mA/100mA
  Input voltage (VIN): 5V
  Standby power consumption:  <5μA

Hardware Pinout

There are 11 digital i/o that can be used as PWM pins and 6 analog i/o that can be used as ADC pins. It supports UART, IIC, and SPI all three common serial ports.

The topside of the board has reset button, 6 DOF IMU LSM6DS3TR-C, Bluetooth Antenna, PDM Microphone, RGB LED & power LED.

On the backside of the board there are SWD Pins for Debugging and Reflashing Bootloader using JLink. There are pair of pins to connect the NFC Antenna & also a 3.7V Lithium-Ion Battery.




Setting Up Arduino IDE

Now let us learn how we can use Seeed XIAO BLE nRF52840 (Sense) with Arduino IDE. First we need to setup the Arduino IDE for programming.

Seeed XIAO nRF52840 Sense

Connect the XIAO BLE (Sense) to your computer via a USB Type-C cable.


Software Setup

Download and Install the latest version of Arduino IDE according to your operating system. Then launch the Arduino application.

There is no pre-installed package for NRF52840 Board. So we need to first install the board on Arduino IDE. To do that 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 “seeed nrf52” in the search box, select the latest version of Seeed nRF52 Boards, and install it.

After installing the board package, navigate to Tools > Board > Seeed nRF Boards and select “Seeed XIAO BLE – nRF52840“. Now we have finished setting up the XIAO BLE (Sense) for Arduino IDE.

Navigate to Tools > Port and select the serial port. You can get the port number from the Device Manager.




Writing an Arduino Code to Blink an LED

Navigate to File > Examples > Basics > Blink to open Blink example. Then upload the code.

1
2
3
4
5
6
7
8
9
10
11
12
13
// 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(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

After uploading the code, the on-board will turn-ON and OFF for 1 second.


Using ADC Pin to control the LED Brightness

Now lets use a Potentiometer to control the LED brightness. The potentiometer will act as an input and LED will act as output. Here is a simple connection diagram.

Connect the pin1, pin2 & pin3 of potentiometer to 3.3V, analog pin A0 & GND of XIAO BLE nRF52840 respectively. Connect the positive pin of LED to digital pin 10 via 220-ohm resistor. Connect the LED GND to GND.

Copy the following code and upload it to the Seeed XIAO BLE nRF52840 (Sense) Board.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const int LED = 10;
const int analog_ip = A0;
int inputVal = 0;
float mv_per_lsb = 3300.0F / 1024.0F; // 10-bit ADC with 3.3V input range
 
void setup()
{
  Serial.begin(115200);
  while ( !Serial ) delay(10);   // for nrf52840 with native usb
  pinMode (LED, OUTPUT);
}
 
void loop()
{
  inputVal = analogRead(analog_ip);
  Serial.println(inputVal);
  Serial.print((float)inputVal * mv_per_lsb);
  Serial.println(" mV");
  analogWrite (LED, inputVal);
  delay(100);
}

After the code gets uploaded, you can open Serial Monitor and start rotating the potentiometer knob. The Serial Monitor will display some analog values with the ADC voltage ranging from 0-3.3V.

Similarly the LED brightness increases or decreases on the basis of potentiometer rotation.

Seeed XIAO nRF52840 ADC

<


Reading Temperature & Humidity Value from DHT11 Sensor

Now let us interface DHT11 Humidity sensor with Seeed XIAO BLE nRF52840 Sense. The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and spits out a digital signal on the data pin.

Seeed XIAO BLE nRF52840 DHT11

Connect the VCC & GND Pin of DHT11 Sensor to nRF52840 3.3V & GND Pin respectively. Connect the digital output pin of DHT11 Sensor to digital pin 7 of XIAO BLE nRF52840.

To use this code with Arduino IDE, you need to install DHT11 Library.

Now copy the following code and upload it to the Seeed XIAO nRF52840 board.

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
#include <dht.h>
#define dht_pin 7 // Analog Pin sensor is connected to
 
dht DHT;
 
void setup()
{
 
  Serial.begin(9600);
  delay(500);
}
 
void loop()
{
  DHT.read11(dht_pin);
 
  Serial.print("Humidity: ");
  Serial.print(DHT.humidity);
  Serial.println("%  ");
 
  Serial.print("Temperature: ");
  Serial.print(DHT.temperature);
  Serial.println("°C  ");
  Serial.println();
  delay(2000);
}

After uploading the code, open Serial Monitor and you can see the temperature and Humidity data displayed on Serial Monitor.


Displaying text on 0.96″ I2C OLED Display

Now let us interface SSD1306 0.96″ I2C OLED Display with Seeed XIAO nRF52840 Sense. The connection is fairly simple as shown in image below.

Seeed XIAO nRF52840 Sense OLED

Connect the VCC & GND pin of OLED Display to nRF5840 3.3V & GND Pin. Also, connect the SDA & SCL Pin of OLED to nRF5840 SDA & SCL Pin.



To use this code with Arduino IDE, you need to install Adafruit GFX Library and also Adafruit SSD1306 Library.

Now copy the following code and upload it to the Seeed XIAO nRF52840 board.

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
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
 
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
 
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
 
void setup()
{
  Serial.begin(115200);
 
  if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) // Address 0x3D for 128x64
  {
    Serial.println(F("SSD1306 allocation failed"));
    for(;;);
  }
  delay(2000);
  display.clearDisplay();
 
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0, 10);
  // Display static text
  display.println("how2electronics.com");
  display.display();
}
 
void loop() {
  
}

As soon as the code gets uploaded the OLED Display will start displaying the text assigned in the code part.

Seeed XIAO nRF52840 Sense OLED Display


Video Tutorial & Guide

Getting Started with Seeed XIAO BLE nRF52840 (Sense) | World Smallest Nordic BLE Module
Watch this video on YouTube.

The advanced version or the next part of this tutorial can be followed via the following links:

  1. Using IMU & Microphone on XIAO BLE nRF52840 Sense
  2. Send/Receive Data to Mobile App with XIAO BLE nRF52840 Sense
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit Telegram WhatsApp
Previous ArticleDIY Speedometer using GPS Module Arduino & OLED
Next Article Using IMU & Microphone on XIAO BLE nRF52840 Sense

Related Posts

Building a Smart Sensor Node with a BLE Microcontroller

Building a Smart Sensor Node with a BLE Microcontroller

PIR Motion Detection using Bluetooth & STM32 Board

PIR Motion Detection using Bluetooth & STM32 Board

Updated:December 23, 20234K
Mobile App with XIAO BLE nRF52840 Sense

Send/Receive Data to Mobile App with XIAO BLE nRF52840 Sense

Updated:August 18, 20221110K
Using IMU & Microphone on XIAO BLE nRF52840 Sense

Using IMU & Microphone on XIAO BLE nRF52840 Sense

Updated:March 23, 202526K
Home Automation Raspberry Pi

Smart Phone Controlled Home Automation with Raspberry Pi

Updated:October 21, 20222K
STM32 SHT85 Humidity Temperature Sensor

Collecting SHT85 Sensor Data using STM32 & Bluetooth Low Energy

Updated:August 20, 20222K
Add A Comment

CommentsCancel reply

Latest Posts
IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

May 31, 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
DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

February 1, 2026
Top Posts & Pages
  • 12V DC to 220V AC Inverter Circuit & PCB
    12V DC to 220V AC Inverter Circuit & PCB
  • IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
    IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
  • Designing of MPPT Solar Charge Controller using Arduino
    Designing of MPPT Solar Charge Controller using Arduino
  • How to use INA226 DC Current Sensor with Arduino
    How to use INA226 DC Current Sensor with Arduino
  • ECG Graph Monitoring with AD8232 ECG Sensor & Arduino
    ECG Graph Monitoring with AD8232 ECG Sensor & Arduino
  • IoT Based Electricity Energy Meter using ESP32 & Blynk
    IoT Based Electricity Energy Meter using ESP32 & Blynk
  • LD2410 Sensor with ESP32 - Human Presence Detection
    LD2410 Sensor with ESP32 - Human Presence Detection
  • Buck Converter: Basics, Working, Design & Application
    Buck Converter: Basics, Working, Design & Application
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 (204)
    • ESP32 MicroPython (7)
    • ESP32 Projects (81)
    • 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.