...

Group Assignment 4

Group 1

  • Evelyn Cuadrado
  • Armando Calcina

Group 3

  • Student
  • Student
  • Student

Group 1

Evelyn Cuadrado

I had a meeting with Armando Calcina, where I shared the activities we need to complete. I updated him on my progress and explained the tasks he needs to work on to catch up with the academy, as I am a bit more advanced.


For this group project, I have reviewed two microcontrollers, the RP2040 and the ESP32-C, conducting a detailed comparison to identify their differences, potential, and architectures.


XIAO-RP-2040

Here you can view and download the data sheet.

The Xiao RP2040 board is a compact development board based on the RP2040 microcontroller from Raspberry Pi. It is designed to offer high performance in a small form factor, ideal for low-power electronics projects.

This board features a dual-core ARM Cortex-M0+ microcontroller running at 133 MHz, and provides 264 KB of SRAM for fast and efficient data storage. The external flash memory of 16 MB allows for additional storage for larger projects.

With 26 GPIO pins (digital input/output), it supports various functions such as PWM, SPI, I2C, and UART, making it highly versatile for controlling and communicating with other devices. It also includes a 12-bit analog-to-digital converter (ADC) for reading analog signals.

The Xiao RP2040 is especially designed to simplify programming and is compatible with development environments like Arduino and MicroPython, allowing users to easily and quickly create applications. The board is perfect for applications in robotics, automation, Internet of Things (IoT), and other projects that require an efficient and small microcontroller.

(This data is taken from ChatGPT.)

Toolchain:

  1. IDE:Visual Studio Code (VSCode), Eclipse, or CLion.
  1. Compiler: arm-none-eabi-gcc (part of GCC).
  1. Pico SDK:Development library to interact with RP2040 hardware.
  1. Debugging:OpenOCD or Segger J-Link (JTAG/SWD).
  1. Firmware Loading:.uf2 files loaded via USB (BOOTSEL mode).

Workflow:

  1. Set up the environment:Install VSCode, CMake, GCC, and the Pico SDK.
  1. Develop the code:Write C/C++ code using the Pico SDK.
  1. Compile:Use CMake and Make to generate the .uf2 firmware file.
  1. Load:Connect the RP2040 in BOOTSEL mode and load the .uf2 file.
  1. Debug (optional):Use OpenOCD or Segger J-Link for debugging.
  1. Test and adjust:Verify the firmware functionality and make adjustments.

This is the typical workflow for developing with the RP2040, making it easier to program and load firmware onto its integrated architecture.


Technical specifications

Item Value
CPU Dual-core ARM Cortex M0+ processor up to 133MHz
Flash Memory 2MB
SRAM 264KB
Digital I/O Pins 11
Analog I/O Pins 4
PWM Pins 11
I2C interface 1
SPI interface 1
UART interface 1
Power supply and dowloading interface Type-C
Power 3.3V/5V DC
Dimensions 21x17.8x3.5mm

Summary of Features:

  1. USB-C Interface: For connection and programming.
  1. Reset Pin:To restart the board.
  1. RGB LED:An LED that can display multiple colors (red, green, blue).
  1. User LED:A user-controllable LED (3 colors: red, green, blue).
  1. Power LED: A red LED indicating the board is powered.
  1. BOOT Pin (BOOTSEL):For entering boot mode and loading firmware.

                        from machine import Pin, Timer
                        ledAzul = Pin(25, Pin.OUT)
                        ledRojo = Pin(17, Pin.OUT)
                        ledVerde = Pin(16, Pin.OUT)
        
                        Counter = 0
                        Fun_Num = 0
        
                        def fun(tim):
                            global Counter
                            Counter = Counter + 1
                            print(Counter)
                            ledVerde.value(1)
                            ledRojo.value(1)
                            ledAzul.value(Counter%2)
        
        
                        tim = Timer(-1)
                        tim.init(period=1000, mode=Timer.PERIODIC, callback=fun)
                    

Next, I will provide a code to control the LEDs on the Xiao RP2040.


Now, I’m running a test for blinking LED lights using multiple lights connected to specific pins. In this case, I have three LEDs: one blue, one red, and one green, and the code is designed to make the blue LED blink periodically.



XIAO ESP 32C3

Here you can view and download the data sheet.

Seeed Studio XIAO ESP32C3 is an IoT mini development board based on the Espressif ESP32-C3 WiFi/Bluetooth dual-mode chip. 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 (BLE) 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. It is equipped with rich interfaces and has 11 digital I/O that can be used as PWM pins and 3 analog I/O that can be used as ADC pins. It supports four serial interfaces such as UART, I2C and SPI.


Toolchain:

  1. IDE/Development Environment: ESP-IDF (official), Arduino IDE, or PlatformIO.
  1. CompilerGCC (for traditional ESP32), riscv32-espidf-gnu-toolchain (for ESP32-C3).
  1. Build Tools:CMake and Make (ESP-IDF), PlatformIO (automatic).
  1. Debugging and Programming: OpenOCD or Segger J-Link for advanced debugging, esptool.py or Espressif Flash Tool for uploading firmware.

Workflow

  1. Set up the development environment (ESP-IDF, Arduino IDE, or PlatformIO).
  1. Write the code using the appropriate libraries.
    (CMake, make, or PlatformIO).
  1. Build the project
  1. Upload the firmware to the ESP32-C3 using the USB port and BOOTSEL mode.
  1. Debugthe code if necessary (OpenOCD, J-Link).
  1. Test and adjustthe project based on the results.

This workflow enables efficient development and uploading of projects to the ESP32-C3, whether for IoT applications or embedded systems.


Parts of the XIAO ESP32-C3

  1. USB Type-C Interface: Connection for programming and charging.
  1. Charge LED:Indicator for charging and power status.
  1. ESP32-C3 Microcontroller:RISC-V based microcontroller with Wi-Fi and Bluetooth 5.0 LE.
  1. Reset Button:Button to manually reset the board.
  1. Wi-Fi / Bluetooth Antenna:Internal antenna for wireless connectivity.
  1. JTAG Pads:Pads for advanced debugging via JTAG.
  1. Battery Connector: Connector for external battery (Li-Po or Li-ion).
  1. Boot Button:Button to put the board into bootloader mode and upload firmware.
  1. Thermal Pad:Pad for dissipating heat generated by the microcontroller.

This summary highlights the essential components of the XIAO ESP32-C3, making it ideal for IoT and embedded projects.


from machine import Pin
from time import sleep

# Intentar con el pin GPIO 0 (puede ser otro dependiendo de la placa)
led = Pin(10, Pin.OUT)

while True:
    led.value(1)  # Encender el LED (1 = HIGH)
    sleep(1)      # Esperar 1 segundo
    led.value(0)  # Apagar el LED (0 = LOW)
    sleep(1)      # Esperar 1 segundo
                        
                    

With the help of ChatGPT, I have created a code to activate an LED using GPIO pin 10 on the XIAO ESP32-C3 microcontroller.

Now, with the programming, I'm doing a simple test to see how to turn an LED on and off.



Toolchain & Workflow Comparison Table

Aspect RP2040 (XIAO RP2040) ESP32-C3
Architecture ARM Cortex-M0+ (Dual Core, 133 MHz) RISC-V 32-bit (160 MHz)
Connectivity USB, UART, SPI, I2C Wi-Fi, Bluetooth 5.0, UART, SPI, I2C
Development Environment Arduino IDE, Thonny (MicroPython) Arduino IDE, ESP-IDF, MicroPython
Toolchain Arduino Core for RP2040, MicroPython Espressif IDF, Arduino Core, MicroPython
Programming Method USB drag-and-drop (BOOTSEL), Thonny IDE USB/UART flashing tools
Typical Use Case Low-power, compact IoT projects Wireless IoT, more advanced networking
Beginner-Friendliness High – very user-friendly Moderate – requires extra setup

Armando Calcina Sotelo


During this week of group work, I met with my partner Evelyn at the Fab Lab iForniture, located in the city of Lima, and also coordinated with her to research and make the respective comparisons of the microcontrollers that we had selected for our study. Each one was dedicated to the detailed analysis of a specific microcontroller; in my case, I chose the Seeed Studio XIAO ESP32C3, an IoT mini development board based on the Espressif ESP32-C3 and the XIAO RP2040.

1.-Comparison: Tool Chain and Workflow


Aspect XIAO ESP32-C3 XIAO RP2040
Architecture RISC-V 32-bit (ESP32-C3) ARM Cortex-M0+ (RP2040)
Common IDEs Arduino IDE, PlatformIO, ESP-IDF Arduino IDE, PlatformIO, Thonny, CircuitPython
Toolchain / Compiler riscv32-esp-elf-gcc arm-none-eabi-gcc
Supported Frameworks Arduino, ESP-IDF, MicroPython Arduino, Pico SDK, MicroPython, CircuitPython
USB Connection USB-C, requires BOOT button for flashing USB-C, mounts as USB drive (UF2)
Flashing Method esptool.py, Arduino, PlatformIO Drag-and-drop .uf2 file or upload via IDE
Recovery Mode Hold BOOT + Reset to enter flash mode Press BOOT while connecting USB
Typical Workflow (Arduino) Write → Compile → Press BOOT → Upload Write → Compile → Upload or drag UF2
Driver Required CH340 or CP210x (depending on USB chip) Not always needed
Complexity Level Medium Low
Development Speed High (PlatformIO or Arduino) Very high (UF2 or MicroPython)
Official Documentation Espressif Docs Raspberry Pi Docs

1.-XIAO ESP32C3 BOARD

Seeed Studio XIAO ESP32C3 is an IoT mini development board based on the Espressif ESP32-C3 WiFi/Bluetooth dual-mode chip, featuring a 32-bit RISC-V CPU that delivers powerful computing performance with its efficient architecture. It has excellent radio frequency performance, supporting IEEE 802.11 b/g/n WiFi, and Bluetooth 5 (BLE) 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. It is equipped with rich interfaces and has 11 digital I/O that can be used as PWM pins and 3 analog I/O that can be used as ADC pins.

XIAO_ESP32_C3

Specification Detail
Microcontroller ESP32-C3, RISC-V 32-bit single-core
Clock Speed 160 MHz
Flash Memory 4 MB
RAM 400 KB SRAM (plus 8 KB RTC RAM)
Connectivity Wi-Fi 2.4 GHz (802.11 b/g/n), Bluetooth 5.0 LE
GPIO 11 general-purpose I/O pins (I2C, UART, SPI, ADC, PWM, etc.)
ADC 6 ADC channels, 12-bit
Operating Voltage 3.3 V (powered by 5V via USB-C)
Power Consumption Low power, supports deep sleep mode
Power Supply 5 V via USB-C
Buttons 1 BOOT button (for bootloader mode)
Programming Supports Arduino IDE, PlatformIO, ESP-IDF, MicroPython
Compatibility Compatible with Grove / Qwiic development boards (I2C)
USB Interface USB-C (supports programming and power supply)

2.-XIAO RP2040

The Seeed Studio XIAO RP2040 is as small as the Seeed Studio XIAO SAMD21 but it's more powerful. On one hand, it carries the powerful Dual-core RP2040 processor that can flexible clock running up to 133 MHz which is a low-power microcontrollers. On the Seeed Studio XIAO RP2040 there is also 264KB of SRAM, and 2MB of on-board 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. All in all, it is designed in a tiny size as small as a thumb(21x17.8mm) and can be used for wearable devices and small projects.

XIAO-RP2040

Specification Detail
Microcontroller RP2040, ARM Cortex-M0+ dual-core
Clock Speed 133 MHz
Flash Memory 2 MB
RAM 264 KB SRAM
Connectivity None (No Wi-Fi/Bluetooth)
GPIO 26 general-purpose I/O pins (I2C, UART, SPI, ADC, PWM, etc.)
ADC 3 ADC channels, 12-bit
Operating Voltage 3.3 V (powered by 5V via USB-C)
Power Consumption Low power, supports deep sleep mode
Power Supply 5 V via USB-C
Buttons 1 BOOT button (for bootloader mode)
Programming Supports Arduino IDE, PlatformIO, MicroPython, CircuitPython
Compatibility Compatible with many Raspberry Pi accessories and HATs
USB Interface USB-C (supports programming and power supply)

3. Development Workflow and Example Programs

Programming the XIAO ESP32-C3 using Arduino IDE

  1. Install Arduino IDE
  2. Add the ESP32 Board Package
  3. Select the XIAO ESP32-C3 Board
  4. Install USB Drivers (if needed)
  5. Connect the Board via USB-C
  6. Select the Port
  7. Write or Load Your Sketch
  8. Upload the Code
  9. Monitor Serial Output (Optional)
  10. Test Your Program
Example Program: LED blinking

                        #define LED_PIN 13  // Define el pin del LED

                        void setup() {
                           pinMode(LED_PIN, OUTPUT); // Configura el pin como salida
                        }

                        void loop() {
                           digitalWrite(LED_PIN, HIGH); // Enciende el LED
                           delay(500);                  // Espera 500 ms
                           digitalWrite(LED_PIN, LOW);  // Apaga el LED
                           delay(500);                  // Espera 500 ms
                        }
                    

Group 2

Andrés Felipe Guarnizo

Michael Sebastián Torres


For this assignment, Michael Sebastián Torres and Andrés Felipe Guarnizo worked together to explore and compare different embedded architectures using multiple development boards. Each board was configured and tested using its respective toolchain and programming environment.

1. Boards Tested

2. Toolchains and Development Environments

The following table summarizes the environments and tools used for each board:

Board Architecture Toolchain IDE / Environment Programming Language
Arduino UNO AVR Arduino Core for AVR Arduino IDE C/C++
XIAO ESP32-C3 ESP32 ESP32 Arduino Core Arduino IDE C++

3. Board Characteristics

Arduino UNO (AVR Architecture)

Arduino UNO

The Arduino UNO is perhaps one of the most iconic development boards in electronics and education. It uses the ATmega328P microcontroller and is known for its simplicity, robustness, and broad compatibility with sensors, actuators, and libraries. As a board, it's perfect for understanding basic embedded logic, digital and analog pin control, and serial communication. Its limitations in memory and processing power are balanced by its reliability and accessibility, which is why we selected it to contrast with more modern boards.

SpecificationArduino UNO
MicrocontrollerATmega328P
Operating Voltage5V
Input Voltage (recommended)7-12V
Digital I/O Pins14 (6 PWM)
Analog Input Pins6
Clock Speed16 MHz
Flash Memory32 KB
SRAM2 KB
EEPROM1 KB

XIAO ESP32-C3

XIAO ESP32-C3

The XIAO ESP32-C3 is a much more compact and powerful board that brings together small size and wireless communication capabilities. It is based on the ESP32-C3 chip, which uses a RISC-V core and supports Wi-Fi and Bluetooth Low Energy (BLE). From the moment it is configured in the Arduino IDE, it offers a much more complex potential: access to web communication, higher memory, and modern protocols. We used it to explore how a board with more recent architecture integrates into the same workflow but opens up more advanced embedded systems possibilities.

SpecificationXIAO ESP32-C3
MicrocontrollerESP32-C3 (RISC-V)
Operating Voltage3.3V
Wi-Fi802.11 b/g/n (2.4 GHz)
BluetoothBluetooth 5.0 (LE)
Digital I/O Pins11 (4 PWM)
Analog Input Pins4
Clock Speed160 MHz
Flash Memory4 MB
SRAM400 KB

4. Development Workflow and Example Programs

Arduino UNO Workflow

  1. Install the latest version of the Arduino IDE.
  2. Connect the Arduino UNO board via USB.
  3. Select the board from Tools > Board > Arduino Uno.
  4. Select the correct port from Tools > Port.
  5. Write or load a program in the Arduino IDE.
  6. Click the "Upload" button to compile and send the code to the board.
Example Program: Button and LDR Controlled LEDs

                    const int pinLDR = A0;
                    const int pinButton = 2;
                    const int pinRedLED = 9;
                    const int pinGreenLED = 10;
                        
                    // Light threshold (adjust depending on environment)
                    const int lightThreshold = 300;
                        
                    void setup() {
                        pinMode(pinButton, INPUT);
                        pinMode(pinRedLED, OUTPUT);
                        pinMode(pinGreenLED, OUTPUT);
                        Serial.begin(9600);
                    }
                        
                    void loop() {
                        int lightValue = analogRead(pinLDR);
                        int buttonState = digitalRead(pinButton);
                        
                        Serial.print("Light: ");
                        Serial.print(lightValue);
                        Serial.print(" | Button: ");
                        Serial.println(buttonState);
                        
                        if (buttonState == HIGH) {
                        digitalWrite(pinRedLED, HIGH);
                        digitalWrite(pinGreenLED, LOW);
                        } else if (lightValue < lightThreshold) {
                        digitalWrite(pinRedLED, LOW);
                        digitalWrite(pinGreenLED, HIGH);
                        } else {
                        digitalWrite(pinRedLED, LOW);
                        digitalWrite(pinGreenLED, LOW);
                        }
                        
                    delay(100);
                    }
                    }

Here you can see the system in action.

XIAO ESP32-C3 Workflow

  1. Install the latest version of the Arduino IDE.
  2. Add the ESP32 board manager URL to Preferences:
    https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  3. Install "esp32" via Tools > Board > Board Manager.
  4. Select the board XIAO_ESP32C3 from Tools > Board.
  5. Connect the board via USB-C and select the correct port.
  6. Write or load the program and click "Upload" to compile and flash the board.
Example Program: Button and LDR Controlled LEDs
const int buttonPin = 2;
                    const int redLedPin = 9;
                    const int greenLedPin = 10;
                    const int ldrPin = A0;

                    void setup() {
                    pinMode(buttonPin, INPUT);
                    pinMode(redLedPin, OUTPUT);
                    pinMode(greenLedPin, OUTPUT);
                    Serial.begin(9600);
                    }

                    void loop() {
                    int buttonState = digitalRead(buttonPin);
                    int ldrValue = analogRead(ldrPin);

                    if (buttonState == HIGH) {
                        digitalWrite(redLedPin, HIGH);
                        digitalWrite(greenLedPin, LOW);
                    } else if (ldrValue < 500) {
                        digitalWrite(redLedPin, LOW);
                        digitalWrite(greenLedPin, HIGH);
                    } else {
                        digitalWrite(redLedPin, LOW);
                        digitalWrite(greenLedPin, LOW);
                    }
                    delay(100);
                    }

Here you can see the XIAO ESP32 C3 in action.


Comparative Table of Microcontrollers

Feature Arduino Uno ESP32-C3
Architecture AVR (8-bit) RISC-V (32-bit)
Clock Speed 16 MHz 160 MHz
Flash Memory 32 KB 400 KB + external
SRAM 2 KB 400 KB
GPIO Pins 14 22
Connectivity None Wi-Fi, BLE
USB Support USB 2.0 USB 2.0

Fab Lab Lima - Creative Commons Attribution Non Commercial

Source code hosted at Fab Lab Lima 2025

|