Tool Libs
UMIT-TIROL Institute of Automation and Control Engineering library collection
 
Loading...
Searching...
No Matches
ADS1115 Class Reference

Implementation of the ADS1115 analog to digital converter. More...

#include <ADS1115.h>

Inherits I2C::Device.

Collaboration diagram for ADS1115:
[legend]

Public Types

enum  range
 full scale range options
 
enum  dataRate
 output data rate (samples per second) options
 
enum  mux
 multiplexer setting options More...
 

Public Member Functions

 ADS1115 (Sink< I2C::Request > &bus, uint8_t address=0b1001000, enum range fs=FS6144, enum dataRate dr=SPS64, enum mux mx=AIN0)
 configure and start voltage conversions
 
void updateConfig ()
 update device config
 
void measure ()
 async read data from device
 
double volts ()
 

Public Attributes

enum ADS1115::range eFullScale = FS2048
 current full scale setting
 
enum ADS1115::dataRate eDataRate = SPS128
 current data rate
 
enum ADS1115::mux eMux = AIN0_1
 current multiplexer setting
 

Detailed Description

Implementation of the ADS1115 analog to digital converter.

Warning
comparator modes not implemented!
threshold settings not implemented!
single shot conversion mode not implemented!

see http://www.ti.com/lit/ds/symlink/ads1115.pdf for details

Member Enumeration Documentation

◆ mux

multiplexer setting options

first index is positive lead, second index negative

only one index means single ended measurements

e.g. AIN0_3 differentially measures voltage on pin 0 against pin 3

Constructor & Destructor Documentation

◆ ADS1115()

ADS1115::ADS1115 ( Sink< I2C::Request > &  bus,
uint8_t  address = 0b1001000,
enum range  fs = FS6144,
enum dataRate  dr = SPS64,
enum mux  mx = AIN0 
)
inline

configure and start voltage conversions

Parameters
busI2C request queue
address7bit I2C address of ADS1115 device
fsfull scale range on inputs
drdata rate / conversion speed
mxinitial multiplexer setting

Member Function Documentation

◆ updateConfig()

void ADS1115::updateConfig ( )
inline

update device config

sends parameters set in class to device

◆ volts()

double ADS1115::volts ( )
inline
Returns
last measured voltage [V]

The documentation for this class was generated from the following file: