Thomas Feldmann's Arduino-Blinkenlight Brings You Smooth Non-Blocking Status LED Flashing and Fading

This clever new library is designed for sending status messages via LED, buzzer, or another pin-addressable device of your choice.

Gareth Halfacree
3 years agoLights / HW101 / Debugging

Developer Thomas Feldmann has released an Arduino library designed to offer non-blocking pattern and fade controls for connected LEDs — ideal for providing smooth-looking status reports without slowing down the rest of your program: Arduino-Blinkenlight.

"I created this library because I like to blink my error codes to the user," Feldmann explains. "So for example blink two times for problems with component X, three times for component Y — you get the idea. This library gives you non-blocking blinking patterns and smooth fade effects for your LEDs, buzzers or any other status indicators."

Named for a classic piece of technological japery — a cod-German warning message telling untrained individuals that "das komputermaschine ist nicht für gefingerpoken und mittengraben" and to simply "relaxen und watschen der blinkelichten" — the Arduino-Blinkenlight library's primary selling point is that is entirely non-blocking: Where most LED-flashing approaches rely on adding delays to a program, at which point the microcontroller is spinning and achieving nothing, Arduino-Blinkenlight allows the program to continue running even as the status LEDs are toggled.

The library includes basic on/off and toggle control, simple programming of blink patterns, on-the-fly adjustment of all time periods within a pattern, and optional fading with logarithmic brightness compensation to ensure a smooth transition. It also promises easy extensibility for controlling external hardware over SPI, I2C, UART, CAN, and other bus types.

Feldmann has released the Arduino-Blinkenlight library on Platform.io, with plans to bring it to the Arduino IDE's Library Manager "soon;" the source code, meanwhile, is available on GitHub under the permissive MIT license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles