10#include "esp_adc/adc_cali.h" 
   11#include "esp_adc/adc_cali_scheme.h" 
   12#include "esp_adc/adc_oneshot.h" 
   13#include "hal/adc_types.h"   
   17#include <zephyr/drivers/adc.h> 
   25#if (ESP_IDF_VERSION_MAJOR == 5 && \ 
   26     ((ESP_IDF_VERSION_MINOR == 0 && ESP_IDF_VERSION_PATCH >= 5) || \ 
   27      (ESP_IDF_VERSION_MINOR == 1 && ESP_IDF_VERSION_PATCH >= 3) || \ 
   28      (ESP_IDF_VERSION_MINOR >= 2)) \ 
   31static const adc_atten_t ADC_ATTEN_DB_12_COMPAT = ADC_ATTEN_DB_12;
 
   33static const adc_atten_t ADC_ATTEN_DB_12_COMPAT = ADC_ATTEN_DB_11;
 
   65  void setup() 
override;
 
 
 
BedjetMode mode
BedJet operating mode.
This class simplifies creating components that periodically check a state.
struct esphome::adc::ADCSensor::SetupFlags setup_flags_
void set_channel(adc_unit_t unit, adc_channel_t channel)
Configure the ADC to use a specific channel on a specific ADC unit.
void set_sampling_mode(SamplingMode sampling_mode)
Set the sampling mode for how multiple ADC samples are combined into a single measurement.
float sample_fixed_attenuation_()
void set_autorange(bool autorange)
Set whether autoranging should be enabled for the ADC.
void set_sample_count(uint8_t sample_count)
Set the number of samples to be taken for ADC readings to improve accuracy.
void set_pin(InternalGPIOPin *pin)
Set the GPIO pin to be used by the ADC sensor.
float sample() override
Perform a single ADC sampling operation and return the measured value.
float sample_autorange_()
void set_attenuation(adc_atten_t attenuation)
Set the ADC attenuation level to adjust the input voltage range.
adc_oneshot_unit_handle_t adc_handle_
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.
void set_is_temperature()
void update() override
Update the sensor's state by reading the current ADC value.
SamplingMode sampling_mode_
void set_adc_channel(const adc_dt_spec *channel)
Set the ADC channel to be used by the ADC sensor.
static adc_oneshot_unit_handle_t shared_adc_handles[2]
float get_setup_priority() const override
Return the setup priority for this component.
void set_output_raw(bool output_raw)
Enable or disable the output of raw ADC values (unprocessed data).
adc_cali_handle_t calibration_handle_
Aggregator(SamplingMode mode)
Base-class for all sensors.
Abstract interface for components to request voltage (usually ADC readings)
const LogString * sampling_mode_to_str(SamplingMode mode)
Providing packet encoding functions for exchanging data with a remote host.
uint8_t handle_init_complete
uint8_t calibration_complete