.................
This commit is contained in:
@@ -10,6 +10,14 @@ namespace showcase_component {
|
|||||||
void ShowcaseComponent::setup() {
|
void ShowcaseComponent::setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ShowcaseComponent::turn_on(){
|
||||||
|
this->write_state(On);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShowcaseComponent::turn_off(){
|
||||||
|
this->write_state(Off);
|
||||||
|
}
|
||||||
|
|
||||||
void ShowcaseComponent::loop() {
|
void ShowcaseComponent::loop() {
|
||||||
uint8_t data = 10;
|
uint8_t data = 10;
|
||||||
this->read_register(0x0, &data, 0x1);
|
this->read_register(0x0, &data, 0x1);
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ class ShowcaseComponent : public i2c::I2CDevice, public Component, public Entity
|
|||||||
float b_upper_ = 1.0;
|
float b_upper_ = 1.0;
|
||||||
float b_lower_ = 1.0;
|
float b_lower_ = 1.0;
|
||||||
|
|
||||||
|
void turn_on();
|
||||||
|
void turn_off();
|
||||||
|
|
||||||
|
|
||||||
void setup() override;
|
void setup() override;
|
||||||
void loop() override;
|
void loop() override;
|
||||||
void dump_config() override;
|
void dump_config() override;
|
||||||
|
|||||||
Reference in New Issue
Block a user