ESPHome 2026.11.0b6
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 SUB_SENSOR(temperature)
85 SUB_SENSOR(altitude)
86 SUB_SENSOR(pressure)
87
88 public:
89 void setup() override;
90 void dump_config() override;
91 void update() override;
92};
93
94} // namespace esphome::mpl3115a2
virtual void setup()
Where the component's initialization should happen.
Definition component.cpp:84
This class simplifies creating components that periodically check a state.
Definition component.h:532
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:144
@ 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