nekuz0r / wiring-pi Goto Github PK
View Code? Open in Web Editor NEWThis project forked from wiringpi/wiringpi-node
Node.js bindings to wiringPi
This project forked from wiringpi/wiringpi-node
Node.js bindings to wiringPi
First run at node wiringpi, so apologies if I'm just being obtuse.
Running npm install git+https://github.com/nekuz0r/wiring-pi.git generated a good number of warnings such as
../src/bindings.cc:2273:3: warning: ‘static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::InvocationCallback, v8::Handle<v8::Value>, v8::Handle<v8::Signature>, int)’ is deprecated (declared at /root/.node-gyp/0.11.6/deps/v8/include/v8.h:3354) [-Wdeprecated-declarations]
And running the following code:
var wiringpi = require( 'wiring-pi' );
var RELAY_A = 24
var RELAY_B = 25
exports.getCurrentState = function(){
wiringpi.setup('gpio');
var selectedRelay = RELAY_A
var relayState = wiringpi.digitalRead(selectedRelay)
return relayState;
};
Generated the following error:
node: symbol lookup error: /usr/local/myapp/app/node_modules/wiring-pi/build/Release/wiringPi.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPFNS_6HandleINS_5ValueEEERKNS_9ArgumentsEES3_NS1_INS_9SignatureEEEi
This is running on a v1 Pi running Raspian IPE (in R/W mode of course :p )
Any ideas?
Cheers!
Hi,
I tried using the incoming-v2.x
branch by specifying it as a npm dependency (nekuz0r/wiring-pi#incoming-v2.x
) and running npm i
:
$ npm i
/
> [email protected] install /home/pi/pi-gpio/node_modules/wiring-pi
> /bin/bash ./install.sh
Cloning libWiringPi ... done.
patching file ./wiringpi/devLib/Makefile
Hunk #1 FAILED at 26.
Hunk #2 FAILED at 33.
patch: **** Can't reopen file ./wiringpi/devLib/Makefile : No such file or directory
patching file ./wiringpi/gpio/Makefile
Hunk #1 FAILED at 25.
patch: **** Can't reopen file ./wiringpi/gpio/Makefile : No such file or directory
Making libWiringPi ... ./install.sh: line 55: cd: ./wiringpi/wiringPi/: No such file or directory
failed.
================================================================================
FATAL: Making libWiringPi failed.
Please check install.log and fix any problems. If you're still stuck,
then please open a new issue then post all the output and as many details as you can to
https://github.com/eugeneware/wiring-pi/issues
================================================================================
npm ERR! Linux 3.16.3-1-ARCH
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i"
Simply cloning and ./install.sh
ing it worked fine though.
Just wondering whether you know what’s going on – is this what the commented out lines are about?
Thank you for all the work! :)
Edit: Does npm
just not respect submodules? That’s what I take from this StackOverflow q.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.