status

Controlling PWR and ACT LEDs on the Raspberry Pi

All Raspberry Pi models have a few built-in LEDs; the earlier models had PWR, ACT, and networking status LEDs all lined up on the board itself; for the B+ and model 2 B, the networking LEDs moved onto the network jack itself, leaving just two LEDs; PWR (a red LED) and ACT (a green LED).

Normally, whenever the Pi is powered on—except if the power supply dips below something like 4.5VDC—the red PWR LED remains lit no matter what. If you wanted to 'disable' the LED, you'd have to put a piece of tape or something else over the LED, or get out a soldering iron and modify the hardware a bit.

Raspberry Pi model 2 B, B+ and A+ (and beyond)

Luckily, with the Pi 2 model B, B+, A+, and Zero, you can control the LEDs in software, in a few different ways. The simplest way to change the way these LEDs work is to modify the trigger for each LED by setting it in /sys/class/leds/led[LED_ID]/trigger, where you replace [LED_ID] with 0 for the green ACT LED, and 1 for the red PWR LED.

For example:

More Blog Updates...

I have added a new section, 'Top Posts,' on my sidebar, linking to some of my past blog posts that were best. I also changed the headlines for stories; instead of SHOUTING IN ALL CAPS, they are now quite tame, 'As a Normal Headline Should Be.' (I have been working on making my site a little more like the ideals outlined on this webpage).

Please pray for my mother, who has been having some back pain and leg pain recently, and for a brother seminarian, whose cousin has recently died.