Hacker News new | ask | show | jobs
by kmacleod 443 days ago
We implemented a low-power wireless sensing device on a microcontroller using asynchronous coroutines in C to replace eight state machines. It was a dream. Every operation process was clearly "linear" in readability while overlapping radio frequency hopping, sensor power-up/down sequencing, sense state, transmission, firmware update, etc. All while going into low-power mode until the next event to process.