2 months ago, I configured my raspberry to use GPIO. I don't remember exactly what I did, but I do remember needing to configure something to enable GPIO. It worked great.
2 months later and multiple reboots, the code fails on the first 2 line. I'm at a loss to figure out why this is failing. I am suspecting the GPIO are no longer enabled.
I could use some pointer being that I'm a newbie.
var fs = require('fs'), var valuefd = fs.openSync('/sys/class/gpio/gpio5/value', 'r'),
I run this code with sudo node xxxx and the following error is produced
ENOENT: no such file or directory, open 'sys/class/gpio/gpio5/value'
When I do a sudo ls /sys/class/gpio, I get the following:
export gpiochip0 unexport
I don't see gpio5
When i do a sudo ls /sys/class/gpio/gpio5, I get the following:
ls: cannot access /sys/class/gpio/gpio5: No such file or directory
Any help or suggestions where to poke next would be appreciated.
I'm running the OS that came with the raspberry pi. I believe this is Debian.