9static const char *
const TAG =
"adc.libretiny";
12#ifndef USE_ADC_SENSOR_VCC
18 LOG_SENSOR(
"",
"ADC Sensor",
this);
19#ifdef USE_ADC_SENSOR_VCC
20 ESP_LOGCONFIG(TAG,
" Pin: VCC");
22 LOG_PIN(
" Pin: ", this->
pin_);
28 LOG_UPDATE_INTERVAL(
this);
40 return aggr.aggregate();
48 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)
Providing packet encoding functions for exchanging data with a remote host.