Week 4: Embedded Programming
This page
Before starting
Embedded system
An embedded system is an electronic system designed to perform a specific function within a larger system, integrating hardware and software to control, monitor, or automate a process. Unlike a general-purpose computer, an embedded system is dedicated to a concrete task and usually operates continuously and autonomously. It typically receives signals from sensors, processes them through a program, and generates outputs to actuators such as motors, valves, or displays, often working under real-time constraints. Embedded systems are widely used in household appliances, vehicles, medical equipment, industrial systems, drones, and IoT devices, where reliable control, fast response, and low power consumption are required.Microcontroller
A microcontroller is the main component of many embedded systems: it is an integrated circuit that combines a processor, memory, and input/output peripherals on a single chip. It is designed to execute control programs directly on external hardware, allowing it to read sensors, manage communications, and generate signals such as PWM or ADC without the need for a full computer. Thanks to its high level of integration and low cost, microcontrollers are the foundation of most modern electronic controllers. They are commonly programmed in C or C++ and are ideal for automatic control applications and smart devices. For more information, visit the week 4 group page of fab26ESP FAMILY
The ESP family of microcontrollers, developed by Espressif Systems, is designed for networked embedded systems and IoT applications where integrated wireless connectivity is required. These devices combine a microcontroller, RF front-end, memory interfaces, security accelerators, and multiple digital and analog peripherals in a single chip, significantly reducing external component count and system cost.The most widely used line is the ESP32 series, which includes multiple variants with different CPU architectures (Xtensa or RISC-V), core counts, memory capacities, wireless standards, and security features. Across the family, typical capabilities include Wi-Fi, Bluetooth LE or Classic (depending on variant), hardware cryptography, DMA, ADC/PWM/timer peripherals, and native USB in newer models. This makes ESP devices suitable for connected sensors, automation nodes, edge devices, human-machine interfaces, and low-power distributed control systems.
| FRAMEWORK / ENVIRONMENT | MAIN LANGUAGES | TYPICAL USE |
|---|---|---|
| ESP-IDF (official) | C / C++ | Professional and production firmware |
| Arduino Core for ESP | C++ (Arduino style) | Rapid prototyping and education |
| MicroPython | Python | Fast experimentation |
| PlatformIO | C / C++ | Advanced project workflow |
| ESPHome | YAML + C++ backend | Home automation nodes |
| Zephyr RTOS | C | RTOS-based systems |
| Rust for ESP | Rust | Safety-critical / modern embedded |
Main Variants of the ESP32 Family
Raspberry Pi
The Raspberry Pi Foundation is an educational organization focused on expanding access to computing and electronics through affordable, well-documented hardware platforms. In the context of embedded systems for Fab Academy, its main contribution is providing low-cost microcontrollers and development boards that support hands-on design, real-time control, and rapid prototyping. This aligns with the Fab methodology: practical experimentation, open documentation, tight hardware–software integration, and direct work with peripherals and digital interfaces.Arduino
Arduino is an open hardware and software platform focused on embedded systems development, technology education, and rapid prototyping. In embedded systems contexts, Arduino provides microcontroller-based boards, a simplified development environment, and a broad library ecosystem that enables direct implementation of digital and analog I/O control, communication interfaces, and peripheral handling without complex low-level configuration. Its main strength is fast deployment and accessibility, making it well suited for learning, concept validation, and functional prototypes. Typical architectures are based on AVR or ARM microcontrollers programmed in C/C++ using the Arduino framework, which abstracts much of the hardware complexity.
Most commonly used microcontrollers
Language they use
| FAMILY | COMMON LENGUAGES |
|---|---|
| ESP32 | C/C++, Arduino, MicroPython, Rust |
| RP2040 | C/C++, MicroPython |
| Arduino AVR | C/C++ Arduino |
| STM32 | C/C++, Rust |
| XIAO | Arduino / MicroPython |
C vs C++
For the embedded systems development, the selected programming languages were C and C++, since both are industry-standard languages for microcontroller firmware. They provide direct hardware control, high execution efficiency, and low memory overhead, which are critical properties in resource-constrained embedded platforms.C is widely used for low-level firmware because it generates compact and predictable code, with minimal abstraction between software and hardware. C++ extends C by adding abstraction mechanisms such as classes, encapsulation, and templates, which improve code organization and reuse, especially when working with modern embedded frameworks and board support packages.
Wokwi programming
Wokwi is an online simulation platform designed for embedded systems and electronic circuit development without requiring physical hardware. It allows developers and students to build virtual prototypes using microcontroller boards, including devices based on ESP chips from Espressif Systems, and test their behavior in real time. Through simulation, users can verify input/output logic, sensor interaction, actuator control, and serial communication before deploying code to a real board. This makes it especially useful for rapid validation, debugging, and educational demonstrations of embedded control systems that are programmed using industry-standard embedded languages such as C and C++.Arduino programming
Arduino is a hardware and software development platform focused on embedded control, rapid prototyping, and technology education. It provides programmable boards, a unified development environment, and a large ecosystem of libraries that simplify interaction with peripherals, sensors, and communication interfaces. Modern Arduino-compatible environments support ESP-based boards, enabling wireless connectivity and advanced peripherals while keeping the development workflow accessible. In practice, Arduino is widely used to implement functional embedded control prototypes, where firmware written in common embedded languages such as C and C++ can directly manage inputs, outputs, and real-time device behavior.Download files
For download 3D and others files, just click on the dancing shrimp.