![]() |
Data Gator
Hardware and software documentation for the Data Gator project.
|
Public Member Functions | |
Adafruit_ADS1015 (uint8_t i2cAddress=ADS1015_ADDRESS) | |
Instantiates a new ADS1015 class w/appropriate properties. | |
void | begin (void) |
Sets up the HW (reads coefficients values, etc.) | |
uint16_t | readADC_SingleEnded (uint8_t channel) |
Gets a single-ended ADC reading from the specified channel. | |
int16_t | readADC_Differential_0_1 (void) |
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. | |
int16_t | readADC_Differential_2_3 (void) |
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. | |
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. | |
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. | |
void | setGain (adsGain_t gain) |
Sets the gain and input voltage range. | |
adsGain_t | getGain (void) |
Gets a gain and input voltage range. | |
Protected Attributes | |
uint8_t | m_i2cAddress |
uint8_t | m_conversionDelay |
uint8_t | m_bitShift |
adsGain_t | m_gain |
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.
This will also set the ADC in continuous conversion mode.