Week 04 — Embedded Programming
Fab Academy 2026 · XIAO ESP32-C3 · Industrial FabLab UCuenca
Background
In this individual assignment, the objective is to understand the core principles of embedded programming through hands-on experimentation using the XIAO ESP32-C3.
This board is based on the ESP32-C3 microcontroller, featuring a RISC-V architecture, integrated Wi-Fi and BLE communication, and low power consumption. Its compact format makes it ideal for prototyping, IoT experimentation, and educational development in digital fabrication environments.
The practice focuses on controlling a digital output (LED) and parameterizing its blinking behavior within a simulation environment before implementing it physically. This approach aligns with iterative prototyping methodologies used in Fab Academy, where simulation reduces errors prior to hardware deployment.
Objective
- Configure and program the XIAO ESP32-C3.
- Use simulation tools for validation.
- Control a digital LED output.
- Parameterize timing variables.
- Document the programming workflow.
- Validate communication between software and hardware.
Arduino IDE — Development Environment
The programming environment used for this assignment was Arduino IDE, which allows development, compilation, and uploading of firmware to ESP32-based boards.
Installation and Setup Steps:
- Download and install Arduino IDE.
- Open Preferences.
- Add the ESP32 board manager URL.
- Open Boards Manager and install ESP32 package.
- Select board: XIAO ESP32-C3.
- Select correct COM port.
- Verify that compilation completes without errors.
Visual Evidence:
Wokwi — Online Simulation
Before physical implementation, the circuit was tested using Wokwi, an online simulator that supports ESP32 microcontrollers.
Simulation Steps:
- Open Wokwi platform.
- Select ESP32 board model.
- Add LED component.
- Add resistor (220Ω).
- Connect GPIO 3 → LED → Resistor → GND.
- Paste Arduino code.
- Run simulation.
Simulation Image:
Electronic Configuration
Components used:
- XIAO ESP32-C3
- 1 LED
- 220Ω resistor
- Jumper wires
Connection Logic:
GPIO 3 → LED Anode
LED Cathode → 220Ω resistor
Resistor → GND
Circuit Diagram:
Parameterized Code Structure
Instead of using fixed delays, timing variables were defined to allow flexible control of LED behavior.
// Parameter definition
const int ledPin = 3;
int onTime = 1000;
int offTime = 1000;
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop() {
digitalWrite(ledPin, HIGH);
delay(onTime);
digitalWrite(ledPin, LOW);
delay(offTime);
}
Upload and Testing Results
| ON (ms) | OFF (ms) | Result |
|---|---|---|
| 1000 | 1000 | Standard blink |
| 500 | 500 | Fast blink |
| 2000 | 500 | Long ON pulse |
Upload Process:
Hero Shot
Final result of LED blinking controlled by parameterized code.
Physical Assembly on Breadboard
- Insert XIAO ESP32-C3 into breadboard.
- Connect GPIO 3 to LED anode.
- Connect LED cathode to 220Ω resistor.
- Connect resistor to GND rail.
- Connect USB cable for power and programming.
- Upload final tested code.
Assembly Process:
Conclusion
This individual assignment successfully demonstrated the fundamentals of digital output programming using the XIAO ESP32-C3.
By integrating Arduino IDE for development and Wokwi for simulation, a complete iterative workflow was established:
Simulation → Validation → Upload → Physical Implementation
The use of parameterized variables improved flexibility and scalability of the code.
This practice strengthens understanding of GPIO configuration, embedded logic, simulation validation, microcontroller programming workflow, and hardware-software interaction.
Final Checklist
- Linked to the group assignment page
- Browsed and documented some information from a microcontroller’s datasheet
- Programmed a board to interact and communicate
- Described the programming process(es) you used
- Included your source code
- Included ‘hero shot(s)’