Introduction In embedded systems, responsiveness and timing precision are often critical. When a hardware event occurs — such as a GPIO edge, UART byte received,
Category: Design Patterns
The Polling Pattern in Embedded Systems
Introduction In many embedded systems, it’s not always possible — or practical — to use interrupts. Some peripherals don’t provide interrupt lines, others generate events
The Debouncing Pattern in Embedded Systems
Introduction Mechanical switches, buttons, and some sensors don’t produce clean, instantaneous transitions between ON and OFF states. Instead, they generate a series of rapid, unpredictable
The Observer Pattern in Embedded Systems
Introduction In many embedded systems, one hardware event or sensor reading must be used by multiple parts of the system. For example: If each module
The Mediator Pattern in Embedded Systems
Introduction Complex embedded systems quickly develop messy interaction graphs: sensors trigger logic that wakes radios, which log to flash, while power management tries to keep