Adafruit ADS1X15 ADC Driver Library
|
Sensor driver for the Adafruit ADS1015 ADC breakout. More...
#include <Adafruit_ADS1X15.h>
Public Member Functions | |
Adafruit_ADS1015 () | |
Instantiates a new ADS1015 class w/appropriate properties. | |
![]() | |
bool | begin (uint8_t i2c_addr=ADS1X15_ADDRESS, TwoWire *wire=&Wire) |
Sets up the HW (reads coefficients values, etc.) More... | |
int16_t | readADC_SingleEnded (uint8_t channel) |
Gets a single-ended ADC reading from the specified channel. More... | |
int16_t | readADC_Differential_0_1 () |
Reads the conversion results, measuring the voltage difference between the P (AIN0) and N (AIN1) input. Generates a signed value since the difference can be either positive or negative. More... | |
int16_t | readADC_Differential_0_3 () |
Reads the conversion results, measuring the voltage difference between the P (AIN0) and N (AIN3) input. Generates a signed value since the difference can be either positive or negative. More... | |
int16_t | readADC_Differential_1_3 () |
Reads the conversion results, measuring the voltage difference between the P (AIN1) and N (AIN3) input. Generates a signed value since the difference can be either positive or negative. More... | |
int16_t | readADC_Differential_2_3 () |
Reads the conversion results, measuring the voltage difference between the P (AIN2) and N (AIN3) input. Generates a signed value since the difference can be either positive or negative. More... | |
void | startComparator_SingleEnded (uint8_t channel, int16_t threshold) |
Sets up the comparator to operate in basic mode, causing the ALERT/RDY pin to assert (go from high to low) when the ADC value exceeds the specified threshold. More... | |
int16_t | getLastConversionResults () |
In order to clear the comparator, we need to read the conversion results. This function reads the last conversion results without changing the config value. More... | |
float | computeVolts (int16_t counts) |
Compute volts for the given raw counts. More... | |
void | setGain (adsGain_t gain) |
Sets the gain and input voltage range. More... | |
adsGain_t | getGain () |
Gets a gain and input voltage range. More... | |
void | setDataRate (uint16_t rate) |
Sets the data rate. More... | |
uint16_t | getDataRate () |
Gets the current data rate. More... | |
void | startADCReading (uint16_t mux, bool continuous) |
Non-blocking start conversion function. More... | |
bool | conversionComplete () |
Returns true if conversion is complete, false otherwise. More... | |
Additional Inherited Members | |
![]() | |
Adafruit_I2CDevice * | m_i2c_dev |
I2C bus device. | |
uint8_t | m_bitShift |
bit shift amount | |
adsGain_t | m_gain |
ADC gain. | |
uint16_t | m_dataRate |
Data rate. | |
Sensor driver for the Adafruit ADS1015 ADC breakout.