Open xyboox opened 6 years ago
Can you upload your debug log? Try adding DEBUG=rpi-gpio
before your command
Same thing happening here. GPIO (pin 2) interaction is fine via BASH. Debug output:
> var pomise = gpiop.setup(2, gpio.DIR_OUT)
.then(() => gpiop.write(2, false))
.catch(e => { console.log(e); });
undefined
> rpi-gpio seen hardware revision 8322; using pin mode v2 +0ms
rpi-gpio set up pin NaN +8ms
rpi-gpio export pin NaN +5ms
{ [Error: EINVAL: invalid argument, write] errno: -22, code: 'EINVAL', syscall: 'write' }
I switched to PIN 7 (GPIO4), which works fine. I guess SDA0 GPIO2, is not usable for some reason.
Hi, I was trying to test the examples and seems like I'm stuck with this error:
GPIO Setup ERROR: { Error: EINVAL: invalid argument, write errno: -22, code: 'EINVAL', syscall: 'write' }
Here's my code: `// GPIO var gpio = require('rpi-gpio');
I'm using node v8.9.0 on a Raspberry Pi Zero User is added to gpio group.
Any idea about what's wrong? Thanks!
LE: I just saw that actually pin 4 ( one I'm trying to use ) is mapped to 7. So I change it in my code to 7. No I have another error:
GPIO Setup ERROR: %O { Error: EBUSY: resource busy or locked, write errno: -16, code: 'EBUSY', syscall: 'write' }