From 9ee2ee5864f7b75da055e5f789050e9ca92d804b Mon Sep 17 00:00:00 2001 From: gnxlxnxx Date: Sun, 17 Dec 2023 20:21:55 +0100 Subject: [PATCH] Test i2c foo --- .../empty_i2c_component/empty_i2c_component.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/custom_components/empty_i2c_component/empty_i2c_component.cpp b/custom_components/empty_i2c_component/empty_i2c_component.cpp index 03715f0..c005daf 100644 --- a/custom_components/empty_i2c_component/empty_i2c_component.cpp +++ b/custom_components/empty_i2c_component/empty_i2c_component.cpp @@ -7,11 +7,14 @@ namespace empty_i2c_component { static const char *TAG = "empty_i2c_component.component"; void EmptyI2CComponent::setup() { - + this->write_register(0x0, 0x1, 0x1); } void EmptyI2CComponent::loop() { - + this->write_register(0x0, 0x1, 0x1); + delay(1000); + this->write_register(0x0, 0x0, 0x1); + delay(1000); } void EmptyI2CComponent::dump_config(){ @@ -20,4 +23,4 @@ void EmptyI2CComponent::dump_config(){ } // namespace empty_i2c_component -} // namespace esphome \ No newline at end of file +} // namespace esphome