PiLEDlights/README.md

21 lines
825 B
Markdown

# 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