elouann.dev
FR — version française

ProjectsLow-level & embedded

MEP Projects

Embedded exercises on ESP32ongoing

Period
Oct 2026 – present
Context
personal
Team
solo
  • C
  • ESP-IDF
  • Low-level
  • Algorithms
  • Imperative programming
  • Physics
  • Embedded

MEP-1-led

A series of small exercises to learn embedded development from scratch: an ESP32, a few components, and the wish to understand what happens between a line of C and an electric current.

circuitESP32app_main()gpio_set_level()vTaskDelay(500 ms)GPIO2GNDIRlimits the currentLEDback to groundsignal on GPIO23,3 V0 V500 ms500 msperiod: 1 s
DiagramThe first exercise: the program toggles pin GPIO2 every 500 ms, and the series resistor limits the current flowing through the LED.

The idea

MEP stands for “Mega Embedded Project”. Each exercise has its own repository and always follows the same path: I write the program in C with ESP-IDF, build the circuit with real hardware, then draw its schematic.

The schematic is not decoration: drawing it forces me to understand what each component does, instead of copying a circuit found online.

First exercise: an LED

The classic, done properly. In app_main, the pin is reset then configured as an output with gpio_set_direction. A loop then alternates gpio_set_level(…, 1) and gpio_set_level(…, 0), separated by vTaskDelay(pdMS_TO_TICKS(500)).

vTaskDelay does not make the CPU “wait”: it hands control back to the FreeRTOS scheduler for 500 ms. It was the first ESP-IDF concept that made me realise there is already a small operating system under my code.

What comes next

I have only just started. Some exercises will be redone without a framework, going straight to the microcontroller’s registers, to see what ESP-IDF does for me.

What I took away

  • A GPIO pin is a logic level from the code’s point of view, and 3.3 V or 0 V from the circuit’s.
  • An LED without a resistor means a current that nothing limits any more.
  • Even a ten-line program runs on top of a scheduler (FreeRTOS).