8static const char *
const TAG =
"adc.libretiny";
11#ifndef USE_ADC_SENSOR_VCC
17 LOG_SENSOR(
"",
"ADC Sensor",
this);
18#ifdef USE_ADC_SENSOR_VCC
19 ESP_LOGCONFIG(TAG,
" Pin: VCC");
21 LOG_PIN(
" Pin: ", this->
pin_);
27 LOG_UPDATE_INTERVAL(
this);
39 return aggr.aggregate();
47 return aggr.aggregate() / 1000.0f;
virtual uint8_t get_pin() const =0
float sample() override
Perform a single ADC sampling operation and return the measured value.
void setup() override
Set up the ADC sensor by initializing hardware and calibration parameters.
void dump_config() override
Output the configuration details of the ADC sensor for debugging purposes.
SamplingMode sampling_mode_
const LogString * sampling_mode_to_str(SamplingMode mode)