Some people love tiny houses, but I’m fascinated by tiny computers. My house is littered with Raspberry Pi’s, but recently my friend Andy Selle introduced me to Blue Pill single-board computers. These are ARM M3 CPUs running at 72MHz, available for $2 or less on Ebay and Aliexpress, even when priced individually. These are complete computers with 20KB of RAM and 64KB of Flash for programs, and while that may not sound like much memory, their computing power as 32-bit ARM CPUs running at a fast clock-rate make them very attractive for applications like machine learning that rely more on arithmetic than memory. Even better, they can run for weeks or months on a single battery thanks to their ultra-low energy usage.
This makes them interesting platforms to explore the emerging world of smart sensors; they may not quite be fifty cents each, but they’re in the same ballpark. Unfortunately I’m a complete novice when it comes to microcontrollers, but luckily Andy was able to give me a few pointers to help me get started. After I struggled through a few hurdles, I managed to get a workflow laid out that I like, and ran some basic examples. To leave a trail of breadcrumbs for anyone else who’s fascinated by the possibilities of these devices, I’ve open-sourced stm32_bare_lib on GitHub. It includes step by step instructions designed for a newbie like me, especially on the wiring (which doesn’t require soldering or any special tools, thankfully), and has some examples written in plain C to play with. I hope you have as much fun playing with these tiny computers as I have!