ESPHome  2024.11.1
adc128s102_sensor.h
Go to the documentation of this file.
1 #pragma once
2 
6 #include "esphome/core/hal.h"
7 
8 #include "../adc128s102.h"
9 
10 namespace esphome {
11 namespace adc128s102 {
12 
14  public Parented<ADC128S102>,
15  public sensor::Sensor,
17  public:
18  ADC128S102Sensor(uint8_t channel);
19 
20  void update() override;
21  void dump_config() override;
22  float get_setup_priority() const override;
23  float sample() override;
24 
25  protected:
26  uint8_t channel_;
27 };
28 } // namespace adc128s102
29 } // namespace esphome
Abstract interface for components to request voltage (usually ADC readings)
This class simplifies creating components that periodically check a state.
Definition: component.h:283
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base-class for all sensors.
Definition: sensor.h:57
Helper class to easily give an object a parent of type T.
Definition: helpers.h:522