Files
esphome-external-component-…/components/empty_i2c_sensor/empty_i2c_sensor.cpp
T
2023-12-18 22:46:51 +01:00

29 lines
520 B
C++

#include "esphome/core/log.h"
#include "empty_i2c_sensor.h"
#include "esphome/core/log.h"
static const char* const TAG = "i2c sensor";
namespace esphome {
namespace empty_i2c_sensor {
static const char *TAG = "empty_i2c_sensor.sensor";
void EmptyI2CSensor::setup(){
}
void EmptyI2CSensor::update(){
uint8_t data[] = {10};
this->read_register(0x0, &data, 0x1);
ESP_LOGI(TAG, "sensor output: %d", data[0]);
}
void EmptyI2CSensor::dump_config(){
}
} // namespace EmptyI2CSensor
} // namespace esphome