LED Patterns on Raspberry Pi

LED Patterns on Raspberry Pi
Draw Things - Anime Anything - Router in network racks with blinking leds

I use a lot of Raspberry Pis (4B, 3B, 3A, Zero W, etc) and I use them mostly headless. And while I do have a monitoring setup, I always thought that it would be nicer if I could map the default LEDs to something more useful. And guess what, it is really easy and really powerful!

The first one was the easiest and most powerful. I use a Pi4 with OpenWRT, and in it we've a simple Luci GUI to manage it. Have a look here:

The LED Configuration Portal
Further Per LED Configuration Option

On all the rest of them, I used the configuration editing /boot/config.txt and append following:


This gives me some funky LED display from my cluster. You can read more about these options here. You can see heartbeat as the selected mode.

cat /sys/class/leds/ACT/trigger
none rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot [heartbeat] backlight gpio cpu cpu0 cpu1 cpu2 cpu3 default-on input panic actpwr mmc1 mmc0 rfkill-any rfkill-none rfkill0 rfkill1

Subscribe to Prakhar Shukla

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.