Shrinking Blinky As Far As Possible
Many of us know the basic Blink Arduino sketch, or have coded similar routines on other microcontrollers. Flashing an LED on and off—it doesn’t get much simpler than that. But …read more


Many of us know the basic Blink Arduino sketch, or have coded similar routines on other microcontrollers. Flashing an LED on and off—it doesn’t get much simpler than that. But how big should a blink sketch be? Or more importantly, how small could you get it? [Artful Bytes] decided to find out.
The specific challenge? “Write a program that runs on a microcontroller and blinks an LED. The ON and OFF times should be as close to 1000 ms as possible.” The challenge was undertaken using a NUCLEO-L432KC Cortex-M4 with 256 K of flash and 64 K of RAM.
We won’t spoil the full challenge, but it starts out with an incredibly inefficient AI & cloud solution. [Artful Bytes] then simplifies by switching to an RTOS approach, before slimming down further with C, assembly, and then machine code. The challenge was to shrink the microcontroller code as much as possible. However, you might notice the title of the video is “I Shrunk Blinky to 0 Bytes.” As it turns out, if you eliminate the digital code-running hardware entirely… you can still blink an LED with analog hardware. So, yes. 0 bytes is possible.
We’ve featured the world’s smallest blinky before, too, but in a physical sense rather than with regards to code size.