#include <adc.h>
Definition at line 27 of file adc.h.
◆ ADC()
◆ begin()
void ADC::begin |
( |
int |
addr, |
|
|
int |
sda_pin, |
|
|
int |
scl_pin |
|
) |
| |
initialise i2c, ADS1115 and set gain to 2/3
- Parameters
-
addr | ADS i2c address |
sda_pin | |
scl_pin | |
Definition at line 21 of file adc.cpp.
◆ read()
Read ADC value from channel.
- Parameters
-
- Returns
- int16_t : adc value
Definition at line 34 of file adc.cpp.
◆ read_voltage()
Read voltage from ADC channel (computes voltage using the set fixed gain)
- Parameters
-
- Returns
- float : voltage
Definition at line 39 of file adc.cpp.
The documentation for this class was generated from the following files:
- Software/esp32_firmware/include/adc.h
- Software/esp32_firmware/src/adc.cpp