Open IonicaBizau opened 4 years ago
I have a fresh installation of Ubuntu Mate 20.04 and I installed rpi-gpio and ran the following:
const GPIO = require("rpi-gpio").promise const BULB_PIN = 15; (async () => { await GPIO.setup(BULB_PIN, GPIO.DIR_OUT) console.log(await GPIO.read(BULB_PIN)) // => false await GPIO.write(BULB_PIN, true) // This errors })()
UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, open '/sys/class/gpio/gpio22/value'
Running node v10.19.0 installed via apt-get and the npm installation finished successfuly.
v10.19.0
npm
Also, using a similar Python script works fine without root privileges.
How can I run rpi-gpio without root privileges?
I have a fresh installation of Ubuntu Mate 20.04 and I installed rpi-gpio and ran the following:
Running node
v10.19.0
installed via apt-get and thenpm
installation finished successfuly.Also, using a similar Python script works fine without root privileges.
How can I run rpi-gpio without root privileges?