Skip to content

sailingscally/ads1015

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADS1015 Analog to Digital Converter

This is a Node.JS module for the ADS1015 analog to digital converter. Provides two simple asynchronous methods to interact with the device:

  • init(i2c_bus_number, device_address) - initialises the device, both parameters are optional
  • measure(channel, gain) - performs a single conversion on the given channel with the specified gain

Constants

The two constants contain the default values for the I2C bus number and device address.

  • I2C_BUS - defaults to bus number 1
  • I2C_ADDRESS - defaults to address 0x48

Enumerations

Two enumerations facilitate calls to the measure(...) method (see source code for details):

  • Gain - controls the programmable gain amplifier of the device
  • Channel - selects the device input

Tests & Samples

The script test.js provides some sample code which may be used to test connectivity to the device.

Usage

This module isn't published to the NPM registry and needs to be installed from GitHub with the command:

npm install https://github.com/sailingscally/ads1015

About

API for the ADS1015 analog to digital converter.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published