ESPHome  2024.4.0
max44009.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace max44009 {
9 
11 
14  public:
16 
17  void setup() override;
18  void dump_config() override;
19  float get_setup_priority() const override;
20  void update() override;
22  bool set_continuous_mode();
23  bool set_low_power_mode();
24 
25  protected:
27  float read_illuminance_();
28  float convert_to_lux_(uint8_t data_high, uint8_t data_low);
29  uint8_t read_(uint8_t reg);
30  void write_(uint8_t reg, uint8_t value);
31 
32  int error_;
34 };
35 
36 } // namespace max44009
37 } // namespace esphome
I2CRegister reg(uint8_t a_register)
calls the I2CRegister constructor
Definition: i2c.h:149
void set_mode(MAX44009Mode mode)
Definition: max44009.cpp:141
float read_illuminance_()
Read the illuminance value.
Definition: max44009.cpp:69
This class simplifies creating components that periodically check a state.
Definition: component.h:283
This class implements support for the MAX44009 Illuminance i2c sensor.
Definition: max44009.h:13
float convert_to_lux_(uint8_t data_high, uint8_t data_low)
Definition: max44009.cpp:89
BedjetMode mode
BedJet operating mode.
Definition: bedjet_codec.h:151
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
uint8_t read_(uint8_t reg)
Definition: max44009.cpp:123
float get_setup_priority() const override
Definition: max44009.cpp:55
Base-class for all sensors.
Definition: sensor.h:57
This Class provides the methods to read/write bytes from/to an i2c device.
Definition: i2c.h:133
void write_(uint8_t reg, uint8_t value)
Definition: max44009.cpp:133