my issue is around knowing when the raspberry pi is turned off so I can disconnect it from the power supply.
H.W - Rev 1 B+
Details on LEDs:
- PWR LED - ALWAYS ON if POWER SUPPLY IS CONNECTED
- ACT(ACTIVITY) LED - NEVER ON
I assume led1 is ACT in this case and isn't on!
$ cat /sys/class/leds/led1/trigger
[none] rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu cpu0 default-on input panic actpwr mmc0 rfkill-any rfkill-none
turning it on by:
$ modprobe ledtrig_heartbeat
$ sudo sh -c 'echo heartbeat >/sys/class/leds/led0/trigger'
this turned the ACR LED.
Finally, on shutting down the raspberry pi the ACR led is turned off.
- is it safe to immediately plug off the raspberry pi after the ACR LED turned off ?
- Is that a good aproach to know when the rapsberry pi turned off ? If so, how to make the ACT LED turned on at boot?
If not, please advise a solution