ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
mpl3115a2.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome::mpl3115a2 {
8
9// enums from https://github.com/adafruit/Adafruit_MPL3115A2_Library/
11enum {
13
17
20
22
26
29
31
34};
35
37enum {
41};
42
44enum {
49};
50
52enum {
53
59};
60
62enum {
69};
70
72enum {
81};
82
84 public:
86 void set_altitude(sensor::Sensor *altitude) { altitude_ = altitude; }
88
89 void setup() override;
90 void dump_config() override;
91 void update() override;
92
93 protected:
102};
103
104} // namespace esphome::mpl3115a2
This class simplifies creating components that periodically check a state.
Definition component.h:585
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:132
enum esphome::mpl3115a2::MPL3115A2Component::ErrorCode NONE
void set_temperature(sensor::Sensor *temperature)
Definition mpl3115a2.h:85
void set_altitude(sensor::Sensor *altitude)
Definition mpl3115a2.h:86
void set_pressure(sensor::Sensor *pressure)
Definition mpl3115a2.h:87
Base-class for all sensors.
Definition sensor.h:47
@ MPL3115A2_REGISTER_STATUS_TDR
Definition mpl3115a2.h:38
@ MPL3115A2_REGISTER_STATUS_PTDR
Definition mpl3115a2.h:40
@ MPL3115A2_REGISTER_STATUS_PDR
Definition mpl3115a2.h:39
@ MPL3115A2_REGISTER_PRESSURE_LSB
Definition mpl3115a2.h:16
@ MPL3115A2_REGISTER_PRESSURE_MSB
Definition mpl3115a2.h:14
@ MPL3115A2_REGISTER_PRESSURE_CSB
Definition mpl3115a2.h:15
uint16_t temperature
Definition sun_gtil2.cpp:12
uint8_t pressure
Definition tt21100.cpp:7