Strategy Desing Pattern and variadic class templates
The Strategy design pattern is a perfect example of the OOP tenet that says: “favor composition over inheritance”. Inheritance is indeed powerful when it comes to code reuse, or when...
a blog about coding
The Strategy design pattern is a perfect example of the OOP tenet that says: “favor composition over inheritance”. Inheritance is indeed powerful when it comes to code reuse, or when...
Many systems wait continuously for the occurrence of some event, and they react to the event by performing computations or changing their state. Once the event is handled, they go...
According to the GoF book, the intent of the Composite pattern is to “compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions...
The Observer Pattern According to the GoF book the Observer pattern “defines a one to many dependency between objects so that when one object changes state, all its dependents are...
The Command Pattern The Gang of Four’s book gives the following definition of the command pattern: “The Command pattern encapsulates a request as an object, letting you parameterize clients with...
In this project I explain how to drive NeoPixels with an Arduino M0 PRO (SAMD21) using the SPI peripheral with the DMA controller to create colored animated patterns. Since displaying...
When we want to transfer data to/from a peripheral device to perform I/O operations we generally use memory mapped IO: peripherals’ configuration and control registers are mapped to the microcontroller...
In this article I explain how to interface a PS/2 keyboard to a microcontroller. Reading characters from a keyboard is just a matter of understanding the PS/2 protocol which is...
In this past two weeks I spent some time learning how to create a simple graphic application for my STM32F429I-DISCOVERY board. Since it has a QVGA display with a ILI9341...
The STM32 LTDC has a peripheral called LTDC LCD TFT Display Controller which provides a digital parallel interface (DPI) for a variety of LCD and TFT panels. It sends RGB data in...