I want to read the status of GPIO35 on a Raspberry Pi 2 Model B using the sysfs on Raspbian with a 4.0.8-v7+ kernel. I can access other GPIO pins using
/sys/class/gpio but the two leds are already accessable by
My assumption was that putting led1 (the red led) into trigger mode
input the state of the led could be read using the
brightness attribute. This value does not seem to change and is always on 0.
When using non-sysfs tools I can access the state of GPIO35 without a problem:
raspi-gpio get 35 will change its level value from 1 to 0 when an under-voltage occurs. I hope to use one pattern to access all GPIO's by file monitoring using
poll and not revert to a different solution for the leds.
The reason why I'm monitoring GPIO35 is to see if there are voltage issue and report those to the end user, advising to change the adapter and/or cable.
- Would it be better to revert to a generic library?
- Does led trigger
inputdoes what I think it should do?
- Could I configure
led1not to be a led but a gpio in sysfs?
- Could raspberrypi/linux github commit be relevant?