Skip to content

rjd22/nodejs-adcpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nodejs-adcpi for mcp3424

NodeJS library for reading the values generated by the Analog / Digital Converter of AB Electronics:

https://www.abelectronics.co.uk/products/17/Raspberry-Pi--Raspberry-Pi-2-Model-B/56/ADC-Pi-Plus---Raspberry-Pi-Analogue-to-Digital-converter

Example usage:

var mcp3424 = require('./mcp3424');

var address = 0x68;
var gain = 0; //{0,1,2,3} represents {x1,x2,x4,x8}
var resolution = 3; //{0,1,2,3} and represents {12,14,16,18} bits

var mcp = new mcp3424(address, gain, resolution, '/dev/i2c-1');

setInterval(function(){
    console.log('Reading: ' + mcp.getVoltage(0));
}, 1000);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published