From your other posts I think you are using a lite which may have things named differently from my VoCore2's. My lite version was working fine, I left it running and a couple of days later I found it had committed suicide, for $7 I'm not too worried about it but I can't check anything on the lite since then.
In any case
- Code: Select all
root@vocore2:~# ls -d /sys/firmware/devicetree/base/gpio-leds/*led*
/sys/firmware/devicetree/base/gpio-leds/ethernetled
/sys/firmware/devicetree/base/gpio-leds/wifiled
root@vocore2:~#
Gives me two possibilities
- Code: Select all
root@vocore2:/# cat /sys/firmware/devicetree/base/gpio-leds/wifiled/label; echo
VoCore2:pink:wifi
root@vocore2:/#
Tells me my wifiled is labeled VoCore2:pink:wifi, knowing that I can do this
- Code: Select all
root@vocore2:~# echo 0 > /sys/class/leds/VoCore2\:pink\:wifi/brightness
root@vocore2:~# echo 1 > /sys/class/leds/VoCore2\:pink\:wifi/brightness
and the led turns off and back on again. Setting brightness to 0 will turn it off, any positive value turns it on, negative values give an error. Since the gpio-leds has hooks to this it may turn off or on in response to a trigger from gpio-leds. The best way to use it as a gpio would be to recompile with a devicetree set that way.
This is all set in the devicetree when the image is compiled, I haven't seen the source used to compile the lite image.