ESPHome  2022.6.3
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
BedjetMode mode
BedJet operating mode.
Definition: bedjet_base.h:102
I2CRegister reg(uint8_t a_register)
Definition: i2c.h:46
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:266
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
Definition: a4988.cpp:4
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:47
void write_(uint8_t reg, uint8_t value)
Definition: max44009.cpp:133