Tuesday, January 10, 2017

ACT LED Heartbeat for Raspberry Pi


All models of Raspberry Pi have ACT led. ACT led ON when SD card in use and OFF otherwise. 



Except of Raspberry Pi Zero, this devices uses opposite rules - ACT led is always ON and OFF only when SD card in use. This is useful because Raspberry Pi do not have PWD led and you can't understand is it powered on or not.

I like to tune ACT led to be in heartbeat mode, in this mode ACT led blinks twice than pause and again. This is useful because you can understand that device not just powered but also Linux kernel active. 

All that you need just add one line to config.txt file located in /boot partition of SD card.

Note: /boot partition have FAT fs, so you can do all operations directly from Windows OS just by editing text file.

From Linux (Raspbian for example) you need execute
$ sudo nano /boot/config.txt

Then navigate to the end of file and add line:

dtparam=act_led_trigger=heartbeat

That's all. After reboot your ACT led will act in heartbeat mode.

Enjoy!

3 comments:

  1. Thanks! The inversion of ACT LED played a bad joke with me - after I've set the overlayroot in my new Zero Pi. It was just disappointing - ACT constantly ON! Why?
    Now I turned this (unnecessary) LED to the heartbeat.

    ReplyDelete
    Replies
    1. Yes, Pi Zero have absolutely unexpected behavior of ACT LED

      Delete
  2. My raspberry PI Zero W running Kernel version:4.19,(Fully Updated Raspbian Buster Lite.),fails to join my network after adding the following line: "dtparam=act_led_trigger=heartbeat" to the end of my config.txt file. After removing the above quoted line from my config.txt file, the Zero W boots, and joins the network as normal. It as if this may not work anymore, or at least not on a current, up-to date PI Zero W.

    ReplyDelete