Nol.A SDK Library 26.11.2
For IoT System Software Development
Loading...
Searching...
No Matches
Adafruit_ADS1015 Class Reference

Sensor driver for the Adafruit ADS1015 ADC breakout. More...

#include <Adafruit_ADS1X15.hpp>

Inheritance diagram for Adafruit_ADS1015:
Adafruit_ADS1X15

Public Member Functions

 Adafruit_ADS1015 (TwoWire &, uint8_t i2cAddr=ADS1X15_ADDRESS)
 Bind a 12-bit ADS1015; defaults are gain 2/3 and 1600 samples/second.
Public Member Functions inherited from Adafruit_ADS1X15
 Adafruit_ADS1X15 (TwoWire &w, uint8_t i2c_addr=ADS1X15_ADDRESS)
 Bind the I2C bus and address. Use an ADS1015/ADS1115 subclass to set resolution defaults.
bool begin ()
 Initialize I2C and probe the configured address; return true on acknowledgement.
int16_t readADC_SingleEnded (uint8_t channel)
 Block for a single-ended raw ADC conversion.
int16_t readADC_Differential_0_1 ()
 Block for raw signed ADC counts from AIN0 minus AIN1.
int16_t readADC_Differential_0_3 ()
 Block for raw signed ADC counts from AIN0 minus AIN3.
int16_t readADC_Differential_1_3 ()
 Block for raw signed ADC counts from AIN1 minus AIN3.
int16_t readADC_Differential_2_3 ()
 Block for raw signed ADC counts from AIN2 minus AIN3.
void startComparator_SingleEnded (uint8_t channel, int16_t threshold)
 Start continuous comparator operation for channel 0 through 3.
int16_t getLastConversionResults ()
 Read the conversion register and return signed counts at the device resolution.
float computeVolts (int16_t counts)
 Convert counts to volts using the configured gain and ADC resolution.
void setGain (adsGain_t gain)
 Cache the PGA gain used by subsequent conversions and computeVolts().
adsGain_t getGain ()
 Return the cached PGA gain.
void setDataRate (uint16_t rate)
 Cache a device-specific RATE_ADS1015_* or RATE_ADS1115_* register setting.
uint16_t getDataRate ()
 Return the cached data-rate register setting, not a numeric samples/second value.
void startADCReading (uint16_t mux, bool continuous)
 Start a conversion without waiting.
bool conversionComplete ()
 Return the configuration OS bit; used to poll single-shot completion.

Additional Inherited Members

Protected Attributes inherited from Adafruit_ADS1X15
TwoWire & wire
 I2C bus device.
uint8_t i2c_addr
uint8_t m_bitShift
 bit shift amount
adsGain_t m_gain
 ADC gain.
uint16_t m_dataRate
 Data rate.

Detailed Description

Sensor driver for the Adafruit ADS1015 ADC breakout.


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