Arduino · Intermediate · Stufe 26 / 40
Real-Time Multitasking with FreeRTOS on ESP32
Structure firmware into tasks that communicate safely and diagnose the typical failures of concurrent code.
Intermediate freischalten · CHF 19.90 Stufen 14–26, einmalig, kein Abo
10 Lektionen in dieser Stufe
- Tasks versus the Super Loop: When an RTOS Helps
Explain preemptive scheduling and judge when tasks simplify a design. · Lab: Identify which parts of an earlier project would become tasks and why. - Creating Tasks, Stack Sizes and Priorities
Start tasks with suitable stack and priority and see how the scheduler chooses. · Lab: Run two LED tasks at different priorities and observe starvation when one never blocks. - Blocking Delays and Periodic Tasks with vTaskDelayUntil
Yield the processor correctly and keep exact periods. · Lab: Compare timing drift of two periodic tasks on the logic analyzer. - Passing Data Safely Through Queues
Send values and structs between tasks without shared variables. · Lab: Feed sensor samples from a producer task to a display task and handle a full queue. - Mutexes and Protecting Shared Buses
Guard I2C, SPI and serial access used by several tasks and understand priority inheritance. · Lab: Garble serial output with two tasks, then fix it with a mutex. - Binary Semaphores and Deferred Interrupt Handling
Signal a task from an interrupt and do the real work outside the service routine. · Lab: Handle a button interrupt by waking a high-priority task. - Task Notifications and Software Timers
Use lightweight signalling and timer callbacks instead of extra tasks. · Lab: Replace a semaphore with a notification and add a one-shot timeout timer. - Pinning Tasks to Cores and Coexisting with Wi-Fi
Distribute work across the two cores without disturbing the radio stack. · Lab: Pin a time-critical sampling task to one core and measure jitter with Wi-Fi traffic running. - Finding Stack Overflows, Starvation and Deadlocks
Use high-water marks, task lists and reasoning about lock order to locate concurrency bugs. · Lab: Diagnose three prepared faulty programs and fix each. - Task Watchdogs and Recovering from Hangs
Supervise tasks and restart cleanly while recording the cause. · Lab: Make a task hang on purpose and show the watchdog reset with the reason reported after reboot.
Abschlussprojekt
A multitasking data acquisition unit with separate sensor, display, network and storage tasks linked by queues, with stack monitoring and watchdog recovery.
Teile für diese Stufe
- 1 × ESP32 development board
- 1 × USB cable matching the board
- 1 × Solderless breadboard 830 points
- 1 × Jumper wire set male-male and male-female
- 1 × BME280 pressure, humidity and temperature module
- 1 × MPU-6050 accelerometer and gyroscope module
- 1 × OLED display 0.96 inch I2C 128x64
- 1 × microSD card module 3.3 V
- 1 × microSD card 8–32 GB
- 4 × LED 5 mm assorted
- 4 × Resistor 220 ohm
- 2 × Tactile push button
- 1 × USB logic analyzer 8 channel
In jeder Lektion legst du die passenden Teile direkt in den Warenkorb. Arduino-kompatibel →
Voraussetzung: Levels 1–25: ESP32 networking, interrupts, shared-data issues and class-based design.