Most I/O in a microcontroller (like in an Arduino board) consists of transactions. The microcontroller sends a command or a command plus data to a peripheral device and then, perhaps after a short delay, the device sends a response of status and data back to the microcontroller. The Arduino library tends to have only blocking …
Month: February 2021
My final dice game example for the new book uses FreeRTOS. There are three independent (non communicating) tasks, to keep things simple, rather than breaking down the game itself into multiple communicating tasks. There is the game task, a flashing light (“blinky”) task, and a background task used to measure performance, like I did with …
In the new book I’m writing I’ve implemented a dice game in multiple ways, starting with all the code in-line, with blocking routines and no interrupts. This is the typical Arduino approach. I’ve just completed an interrupt driven version. In this version, the function loop is: Because everything happens in interrupts! Many people think that …