(I’m still writing this. It will change over time.)
â€œUse an STM32 Blue Pill or Black Pill micro-controller boardâ€, they said. â€œSo cheap, so powerfulâ€, they said. â€œYou’ll love itâ€, they said.
Dear Reader, none of the above turned out to be true.
For some time now I’ve been looking for a cheap, USB HID micro-controller board that is somewhat more flexible than the ATMega32U4 (Arduinos Leonardo, Micro and Pro Micro; also the impossibly smol Atto) and yet not quite as flexible as the let’s-accidentally-overwrite-our-accessibility-code-with-the-holiday-snaps CircuitPython boards from Adafruit. And for a while it looked like the STM32 boards might do it: they’ve got a 72 MHz ARM Cortex-M3 with at least 64 KB of Flash and 20 KB of SRAM and they’re under $5. Yay?
Not quite. There are three main problems with the STM32 boards that get in the way of inexpensive electronic nerdery.
1: They may not actually be STM32 chips
Slightly grotty photos follow. One day I’ll get a better USB microscope.
First, the chip from a â€œBlack Pillâ€ board bought recently:
Compare with a â€œBlue Pillâ€ bought last year:
Knock-offs are rife in the cheap end of the market, and at least this chip is honest enough to say that it’s not from STMicroelectronics. While it may be possible to program these things with some heroic faffing about, consider balancing the effort required versus the time cost of doing so.
2: They may not have working USB
moar later (about the Blue Pill’s incorrect resistor)
3: The documentation is everywhere and nowhere and Google is not your friend
even moar later (about a very dedicated amateur’s hosting of the project documentation becoming too successful for him to afford)
(Huge thanks to Andrew Klaassen who provided me his notes for getting some of these boards at least able to run Blink under Linux.)