-2

I need to develop a plugin that reads the status of the Power-LED of the Raspberry Pi 3 B and print the status of the LED on the Web-page.

Please Help !!!

1
  • 2
    Returns 1 or 0 for led status: echo file_get_contents('/sys/class/leds/led1/brightness')==255?1:0; Commented Sep 2, 2018 at 8:49

2 Answers 2

1

Not sure about plugin but you can access the state of the APX803 https://github.com/6by9/rpi3-gpiovirtbuf/

The APX803 is connected to pin 135.

1

The power LED is connected to the power management IC (APX803), which in turn is connected directly to the power input. You cannot change whether it is on or off from user space.

2
  • Not entirely true. "The MOSFET controlling the Pi3 "PWR" LED is directly connected to the APX803 (which is open drain) so will ALWAYS be off if the voltage is low, but if not it should be possible to pull it low (and turn the LED off) with a program."
    – Milliways
    Commented Jan 11, 2017 at 23:17
  • 1
    can you tell me, what is the GPIO number of the power led ? Commented Jan 13, 2017 at 19:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.