ESPHome 2025.12.1
Loading...
Searching...
No Matches
mcp3204_sensor.h
Go to the documentation of this file.
1#pragma once
2
6#include "esphome/core/hal.h"
7
8#include "../mcp3204.h"
9
10namespace esphome {
11namespace mcp3204 {
12
14 public Parented<MCP3204>,
15 public sensor::Sensor,
17 public:
18 MCP3204Sensor(uint8_t pin, bool differential_mode) : pin_(pin), differential_mode_(differential_mode) {}
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 pin_;
28};
29
30} // namespace mcp3204
31} // namespace esphome
Helper class to easily give an object a parent of type T.
Definition helpers.h:932
This class simplifies creating components that periodically check a state.
Definition component.h:474
float get_setup_priority() const override
MCP3204Sensor(uint8_t pin, bool differential_mode)
Base-class for all sensors.
Definition sensor.h:43
Abstract interface for components to request voltage (usually ADC readings)
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7