maripo / npm-nau7802 Goto Github PK
View Code? Open in Web Editor NEWNAU7802 A/D converter library for Node.js
License: MIT License
NAU7802 A/D converter library for Node.js
License: MIT License
Please note that pasting the proposed demo code in a new empty file named nau7802_reader.js and calling it with
generates the following runtime errors:
<
/home/pi/node_modules/nau7802/index.js:130
calibrate();
^
ReferenceError: calibrate is not defined
at ADC_NAU7802.selectChannel1 (/home/pi/node_modules/nau7802/index.js:130:5)
at Object. (/home/pi/nau7802_reader.js:5:5)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
I'm totally new to node.js, but I can guess that this depends from missing <this.> in front of calibrate method calls in selectChannelx() methods (lines 130 and 135); adding the <this.> modifier in front of these calls solves the error, but returned values seem to be not valid. Infact I only obtain alternating 256, 512, 0, -256 and -512 values, even if the load cell is progressively loaded.
Hello,
I did installed npm on my raspberry.
I did installed nau7802
How should I run it ?
I do have the NAU7802 board attached to the raspberry over i²c.
Thank you
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.