Loom 4 v4.5
Arduino library for Internet of Things Rapid Prototyping in environmental sensing
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Loom_ADS1115 Class Reference

#include <Loom_ADS1115.h>

Inheritance diagram for Loom_ADS1115:
Inheritance graph
[legend]
Collaboration diagram for Loom_ADS1115:
Collaboration graph
[legend]

Public Member Functions

void initialize () override
 
void measure () override
 
void package () override
 
void power_up () override
 
 Loom_ADS1115 (Manager &man, byte address=ADS1X15_ADDRESS, bool useMux=false, bool enable_analog=true, bool enable_diff=false, adsGain_t gain=adsGain_t::GAIN_ONE)
 
int getAnalog (int pin)
 
int getDiff (int pin)
 
- Public Member Functions inherited from I2CDevice
 I2CDevice (const char *modName)
 
bool checkDeviceConnection ()
 
- Public Member Functions inherited from Module
 Module (const char *modName)
 
void setModuleName (const char *modName)
 
virtual const char * getModuleName ()
 
virtual void printModuleName (const char *message)
 
virtual void initialize ()=0
 
virtual void measure ()=0
 
virtual void package ()=0
 
virtual void power_up ()=0
 
virtual void power_down ()=0
 
virtual void display_data ()
 

Protected Member Functions

void power_down () override
 

Additional Inherited Members

- Public Attributes inherited from I2CDevice
bool needsReinit = false
 
- Public Attributes inherited from Module
bool moduleInitialized = true
 
int module_address = -1
 

Detailed Description

Functionality for the ADS1115

Author
Will Richards

Constructor & Destructor Documentation

◆ Loom_ADS1115()

Loom_ADS1115::Loom_ADS1115 ( Manager man,
byte  address = ADS1X15_ADDRESS,
bool  useMux = false,
bool  enable_analog = true,
bool  enable_diff = false,
adsGain_t  gain = adsGain_t::GAIN_ONE 
)

Construct a new ADS1115

Parameters
manReference to the manager
useMuxWhether or not to use the mux
addressI2C address to communicate over
enable_analogIf we want to read the analog data from the ADS1115
enable_diffIf we want to read the differential data from the sensor
gainHow much gain to apply to the readings.

Member Function Documentation

◆ getAnalog()

int Loom_ADS1115::getAnalog ( int  pin)
inline

Get the value in the analog table according to analog number not INDEX

Parameters
pinPin to get data from (1-4)

◆ getDiff()

int Loom_ADS1115::getDiff ( int  pin)
inline

Get the value in the diff table according to diff number not INDEX

Parameters
pinPin to get data from (1-2)

◆ initialize()

void Loom_ADS1115::initialize ( )
overridevirtual

Implements Module.

◆ measure()

void Loom_ADS1115::measure ( )
overridevirtual

Implements Module.

◆ package()

void Loom_ADS1115::package ( )
overridevirtual

Implements Module.

◆ power_down()

void Loom_ADS1115::power_down ( )
inlineoverrideprotectedvirtual

Implements Module.

◆ power_up()

void Loom_ADS1115::power_up ( )
overridevirtual

Implements Module.


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