ESP32/IoT B.Tech/Diploma Beginner

Getting Started with Seeed XIAO ESP32-C3 Board

Getting Started Tutorial with Seeed Studio XIAO ESP32-C3 Board with code for LED Blinking, WiFi Webserver, BLE usage for sensor interfacing

  • Suitable forB.Tech/Diploma ESP32/IoT students
  • Build time1-2 weeks
  • LevelBeginner
  • Available atAjvika Labs, Kakinada

About this project

Overview
This is a Getting Started tutorial on Seeed XIAO ESP32-C3 Board from Seeed Studio. Recently Seeed Studio launched the world’s smallest ESP32 Board called XIAO ESP32 C3. This is an IoT mini-development board based on the Espressif ESP32-C3 WiFi/Bluetooth dual-mode chip.
The main difference between the ESP32 & ESP32-C3 Board is the processor and BLE version. The ESP32 has Tensilica Xtensa LX6 32-bit Dual-Core processor operating at a frequency of 160/240Mhz whereas the ESP32-C3 Board has RISC-V 32-bit Single-Core processing running at a clock frequency of 160 MHz. While comparing the BLE part, ESP32 has 4.2 BR/EDR + BLE and ESP32-C3 has 5.0 + BLE which is upgraded.
In this guide we will learn about the overview of the XIAO ESP32-C3 Board along with its features, capabilities, pin details, and applications. First, we will go through basic usage like the blinking of LED and reading the DHT11 Sensor Data. Under the WiFi usage category, we will create a simple web server where data of a sensor can be viewed on a Webserver. Finally, under the BLE usage part, we will scan the Bluetooth devices nearby using the Bluetooth feature of this board.
You can also check some other XIAO Series board tutorials:

Getting Started with Seeed XIAO RP2040 with Projects
Getting Started with Seeed XIAO BLE nRF52840 Sense
Bill of Materials
Purchase the following components from the given link if you wanna get started with XIAO ESP32-C3 Board.
S.N.
Components
Quantity
Purchase Links

Seeed Studio XIAO ESP32C3

Amazon
AliExpress

LED 5mm Any Color

Amazon
AliExpress

Resistor 200-ohm

Amazon
AliExpress

DHT11 Sensor

Amazon
AliExpress

Jumper Wires

Amazon
AliExpress

Breadboard

Amazon
AliExpress
Seeed Studio XIAO ESP32-C3
The
Seeed Studio XIAO ESP32-C3
carries a complete Wi-Fi system along with Bluetooth Low Energy function. With its exquisite design and WiFi+BLE ability, it’s perfect for various IoT controlling scenarios and complex carriable applications.
ESP32-C3 is a 32-bit RISC-V CPU, which includes an FPU (Floating Point Unit) for 32-bit single-precision arithmetic with powerful computing power. It has excellent radio frequency performance, supporting IEEE 802.11 b/g/n WiFi, and Bluetooth 5 (LE) protocols. This board comes included with an external antenna to increase the signal strength for your wireless applications. It also has a small and exquisite form factor combined with a single-sided surface-mountable design.
Features of Seeed Studio XIAO ESP32-C3
Powerful CPU: ESP32-C3, 32­bit RISC­-V single­core processor that operates at up to 160 MHz
Complete Wi­Fi subsystem: Complies with IEEE 802.11b/g/n protocol and supports Station mode, SoftAP mode, SoftAP + Station mode, and promiscuous mode
Bluetooth LE subsystem: Supports features of Bluetooth 5 and Bluetooth mesh
Ultra-Low Power: Deep sleep power consumption is about 43μA
Better RF performance: External RF antenna included
Battery charging chip: Supports lithium battery charge and discharge management
Rich on-chip resources: 400KB of SRAM, and 4MB of on-board flash memory
Ultra-small size: As small as a thumb(20×17.5mm) XIAO series classic form-factor for wearable devices and small projects
Reliable security features: Cryptographic hardware accelerators that support AES-128/256, Hash, RSA, HMAC, digital signature, and secure boot
Rich interfaces: 1xI2C, 1xSPI, 1xI2S, 2xUART, 11xGPIO(PWM), 4xADC, 1xJTAG bonding pad interface
Single-sided components, surface mounting design
Front & Back Components
The front side of the board has an ESP32-C3 chip packed on an SMD surface of the PCB. Like other ESP32 boards, this board also has a boot and reset button. It also features a charge LED which indicates battery charging while charging the battery. It supports a USB-Type C interface for UART/Serial Communication. The board has a UFL connector for an external antenna to increase the signal strength for any wireless applications.
On the backside of the board, there is a JTAG interface for providing access to debug/emulation functions. A battery connector port is there to connect a 3.7V Lithium-Ion Battery for portable applications. A thermal pad is also provided at the backside of the board which can be used as a cooling system while there is excessive use of the CPU which may produce heat.
Pinout of Seeed XIAO ESP32-C3
The Seeed XIAO ESP32-C3 Board has a total number of 14 pins. Out of 14 pins, it has 11 digital pins (D0-D10) and 4 analog pins (A0-A3). These pins also support I2C, SPI, I2S, and a pair of UART protocols.
The board has 5V, 3.3V & GND as power pin. The USB pin is 5V output. The pin from the board is used as a voltage input but must have some sort of diode (Schottky, signal, power) between the external power source and this pin with the anode to the battery, cathode to 5V pin. The board also outputs 3.3V regulated output from the onboard regulator & can draw current up to 700mA.
Antenna of XIAO ESP32-C3
The XIAO ESP32-C3 has a UFL connector for attaching an antenna. The external antenna of 2.4GHz frequency can be used for WiFi & BLE applications.
Therefore connect an external antenna to increase the signal strength.
Getting Started with Seeed XIAO ESP32-C3 Board
Before using ESP32-C3 Board, we need to setup the Arduino IDE. The Arduino IDE doesn’t have pre-installed ESP32-C3 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://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
Navigate to
Tools > Board > Boards Manager
, type the keyword “
esp32
” in the search box, select the latest version of and install it.
Once the board get installed, navigate to
Tools > Board > ESP32 Arduino
and select “
XIAO_ESP32C3
“. The list of boards is a little longer and you need to roll to the bottom to reach it.
Navigate to
Tools > Port
and select the serial port name of the connected
XIAO ESP32C3
Now your XIAO ESP32-C3 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. Here is the connection diagram for this project.
Connect the LED positive pin to GPIO2 and the LED negative pin to GND via a 200-ohm resistor. You can use a breadboard to assemble the circuit.
Source Code/Program
Copy the following code and upload it to the ESP32-C3 Board.

#define LED_BUILTIN 2
// 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 LED will turn ON/OFF after an interval of 1 second.
Reading DHT11 Sensor Data
The second program we are going to implement is the reading DHT11 Humidity & Temperature sensor data. Here is the connection diagram for this project.
Connect the DHT11 VCC, GND & output pin to 3.3V, GND & GPIO5 of XIAO ESP32-C3 board. You can use a breadboard to assemble the circuit.
Source Code/Program
The code requires
DHT11 Sensor Library
for compilation. Therefore first download and install the library using library manager. Then copy the following code and upload it to the ESP32-C3 Board.

#include "DHT.h"
#define DHTPIN 5 // Digital pin connected to the DHT sensor
#define DHTTYPE DHT11 // DHT 11
DHT
dht
(
DHTPIN
DHTTYPE
)
;
void
setup
(
)
{
Serial
begin
(
9600
)
;
Serial
println
(
F

Technologies used

ESP32ArduinoWiFiBluetoothBLEDHT11I2CSPIUARTPWMADCArduino IDE

Hardware components

  • ESP32
  • Arduino
  • DHT11

Software & tools

  • Arduino IDE

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.