ESPHome 2025.12.0-dev
Loading...
Searching...
No Matches
mcp3221_sensor.h
Go to the documentation of this file.
1#pragma once
2
8
9#include <cinttypes>
10
11namespace esphome {
12namespace mcp3221 {
13
15 public PollingComponent,
17 public i2c::I2CDevice {
18 public:
19 void set_reference_voltage(float reference_voltage) { this->reference_voltage_ = reference_voltage; }
20 void update() override;
21 float sample() override;
22
23 protected:
25};
26
27} // namespace mcp3221
28} // namespace esphome
This class simplifies creating components that periodically check a state.
Definition component.h:437
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:133
void set_reference_voltage(float reference_voltage)
Base-class for all sensors.
Definition sensor.h:42
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