Raspberry Pi heartbeat LED

The Raspberry Pi has two LEDs on the front: One hardwired as a power indicator, and the other is (by default) an SD card activity indicator. This second LED can be changed via software to anything (even a GPIO), but for this, I’m going to show you how to set it as a heartbeat indicator.

sudo su
modprobe ledtrig_heartbeat
echo heartbeat > /sys/class/leds/led0/trigger

The Pi’s led should now start blinking as a heartbeat indicator. If you want to restore the default behavior, you can do so:

echo mmc0 > /sys/class/leds/led0/trigger

That’s all there is to it.

Advertisements