Raspberry Pi - Make LEDs blink on harddisk activity
Go to file
2021-12-21 23:06:34 +01:00
LICENSE.md Add license text 2015-03-17 09:03:38 +01:00
README.md Update README.md 2021-12-21 23:06:34 +01:00
ssdled.c Update ssdled.c 2021-12-21 22:59:40 +01:00

PiLEDlights

For the Raspberry Pi - Make LEDs blink on SD card/USB storage activity. Also one LED if system is booted and another one to check if processes are running.

Prerequirements

Install pigpio

sudo apt install pigpio

Modified to have 3 LEDs

The ssdled was modified to have 3 different LEDs. One for disc activity, one for heartbeat (it checks if processes are running) and one for system readiness (= booted).

Build

gcc -Wall -O3 -o ssdled ssdled.c -lpigpio -lrt -pthread

Service

gcc -Wall -O3 -o ssdled ssdled.c -lpigpio -lrt -pthread && sudo cp ssdled /usr/bin/ssdled && sudo chmod +x /usr/bin/ssdled && sudo nano /etc/init.d/ssdled

and paste content of ssdled.sh script and then execute

cd /etc/init.d/ && sudo chmod 755 ssdled && sudo update-rc.d ssdled defaults && sudo systemctl start ssdled