So this is driving me insane.
I have an LED on GPIO 21.
root@RP0:/sys/class/gpio/gpio21# echo "out" > direction
root@RP0:/sys/class/gpio/gpio21# echo "1" > value
LED lights up.
However;
root@RP0:/sys/class/gpio/gpio21# echo "out" > /sys/class/gpio21/direction
-bash: /sys/class/gpio21/direction: No such file or directory
Anyone know what's going on here? I currently cannot access any GPIO with Node.JS, C++ or anything other than going to the directory in a terminal and switching it there.
It does not matter if I set all GPIO as unexport or individually;
root@RP0:/sys/class/gpio/gpio21# echo "21" > /sys/class/gpio/export
-bash: echo: write error: Device or resource busy
root@RP0:/sys/class/gpio/gpio21# echo "21" > /sys/class/gpio/unexport
root@RP0:/sys/class/gpio/gpio21# echo "out" > "/sys/class/gpio21/direction"
-bash: /sys/class/gpio21/direction: No such file or directory
but;
root@RP0:/sys/class/gpio/gpio21# echo "0" > value
LED turns off.
wtf!
Anyone else seen this? I have searched, but alas nothing works.