Closed Zebiano closed 3 years ago
Turns out I was an idiot and required the package wrongly... Instead of
const Gpio = require('pigpio').gpio;
It should be be:
const Gpio = require('pigpio').Gpio;
This happened because I usually don't use PascalCase
, but instead camelCase
, so I blindly replaced every Gpio
entry to gpio
.
Sorry for wasting an issue on this. It works now, I'm able to read data through the GPIO pins on the Raspberry Pi, thank you!
Hey! I'm currently facing the following issue:
yields the following error:
console.log(Gpio)
returns undefined. Any idea as to why this is happening?I'm using a Raspberry Pi 4 with Ubuntu Server
21.04
and Node14.17.3
. I've installed thepigpio
C library, but I had tomake
it, assudo apt-get install pigpio
gave me anE: Package 'pigpio' has no installation candidate
error. Runningpigpiod -v
results in79
. I'm also running Node withsudo
, since that is apparently a requirement, and I did runnpm i
, as well assudo npm i
.Any help is greatly appreciated!