PiLEDlights/README.md

21 lines
825 B
Markdown
Raw Permalink Normal View History

2015-03-16 22:05:08 +01:00
# PiLEDlights
2021-12-21 23:06:34 +01:00
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
2015-03-16 22:22:35 +01:00
2021-12-21 23:02:05 +01:00
## 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
2021-12-21 23:06:34 +01:00
## 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
2016-10-05 21:30:53 +02:00
2021-12-21 23:06:34 +01:00
and paste content of ssdled.sh script and then execute
2021-12-21 23:06:34 +01:00
cd /etc/init.d/ && sudo chmod 755 ssdled && sudo update-rc.d ssdled defaults && sudo systemctl start ssdled