ESPHome 2025.5.0
Loading...
Searching...
No Matches
mpl3115a2.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace mpl3115a2 {
9
10// enums from https://github.com/adafruit/Adafruit_MPL3115A2_Library/
12enum {
14
18
21
23
27
30
32
35};
36
38enum {
42};
43
45enum {
50};
51
53enum {
54
60};
61
63enum {
70};
71
73enum {
82};
83
85 public:
87 void set_altitude(sensor::Sensor *altitude) { altitude_ = altitude; }
89
90 void setup() override;
91 void dump_config() override;
92 void update() override;
93
94 float get_setup_priority() const override { return setup_priority::DATA; }
95
96 protected:
105};
106
107} // namespace mpl3115a2
108} // namespace esphome
This class simplifies creating components that periodically check a state.
Definition component.h:301
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:133
enum esphome::mpl3115a2::MPL3115A2Component::ErrorCode NONE
float get_setup_priority() const override
Definition mpl3115a2.h:94
void set_temperature(sensor::Sensor *temperature)
Definition mpl3115a2.h:86
void set_altitude(sensor::Sensor *altitude)
Definition mpl3115a2.h:87
void set_pressure(sensor::Sensor *pressure)
Definition mpl3115a2.h:88
Base-class for all sensors.
Definition sensor.h:57
@ MPL3115A2_REGISTER_STATUS_TDR
Definition mpl3115a2.h:39
@ MPL3115A2_REGISTER_STATUS_PTDR
Definition mpl3115a2.h:41
@ MPL3115A2_REGISTER_STATUS_PDR
Definition mpl3115a2.h:40
@ MPL3115A2_REGISTER_PRESSURE_LSB
Definition mpl3115a2.h:17
@ MPL3115A2_REGISTER_PRESSURE_MSB
Definition mpl3115a2.h:15
@ MPL3115A2_REGISTER_PRESSURE_CSB
Definition mpl3115a2.h:16
const float DATA
For components that import data from directly connected sensors like DHT.
Definition component.cpp:19
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
uint16_t temperature
Definition sun_gtil2.cpp:12
uint8_t pressure
Definition tt21100.cpp:7