To do before the session
The installation of PlatformIO (see the prerequisite above) and of ESP32 support must be finished.
Install the ESP32-S3 toolchain and validate your first flash
Checking the toolchain
Set up PlatformIO for the XIAO ESP32S3 and blink the on-board LED, before adding an external LED.
Prerequisites:
Software:
The aim of this tutorial is to check that everyone has a working development toolchain before tackling the rest of the microcontroller adventure. In Lab 2, this same setup will host the modules of the kit; in Lab 3, you will design the board that brings them together.
In VSCode, open the PlatformIO tab (ant icon in the side bar) then New Project.
Configure:
pong-esp32Seeed Studio XIAO ESP32S3ArduinoPlatformIO generates a folder with a platformio.ini file and a src/ folder containing main.cpp. Add the monitor_speed line by hand.
; platformio.ini
[env:seeed_xiao_esp32s3]
platform = espressif32
board = seeed_xiao_esp32s3
framework = arduino
monitor_speed = 115200
The XIAO’s USB-C connector is wired directly to the ESP32-S3’s native USB: there is no USB-serial chip, so no driver to install. Plug the board in with a USB-C cable that carries data (many cables only charge).
COM port appears in Device Manager (“USB Serial Device”)./dev/cu.usbmodem…./dev/ttyACM0; your user must belong to the dialout group to access it without sudo.PlatformIO detects the port on its own at upload time.
Replace the content of src/main.cpp with the code below, then click Upload (arrow →) in the blue PlatformIO bar at the bottom of VSCode.
#include <Arduino.h>
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, LOW); // LOW turns the XIAO's LED on
delay(500);
digitalWrite(LED_BUILTIN, HIGH); // HIGH turns it off
delay(500);
}
The built-in orange LED (LED_BUILTIN) must blink at 1 Hz. Show your blinking board before moving on: it is the only output expected from this Lab 1.
If you have time left, wire an external LED with its series resistor between pin D3 (GPIO4) and GND. It is your first physical output: a test setup, to be removed afterwards: in Lab 2, D3 hosts the kit’s buzzer, and on the console board, the I2C connector.

The photo shows another ESP32-S3 board: the principle is the same, only the pin changes (D3 on the XIAO). This external LED is wired the classic way (anode on the pin side): HIGH turns it on.
Here is the code needed for this demonstration.
#include <Arduino.h>
constexpr int LED_PIN = D3; // GPIO4
void setup() {
pinMode(LED_PIN, OUTPUT);
}
void loop() {
digitalWrite(LED_PIN, HIGH);
delay(500);
digitalWrite(LED_PIN, LOW);
delay(500);
}
The series resistor calculation is detailed in the concept GPIO & the digital world.