mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 17:54:13 +01:00
Add delay to aht10.cpp (#1498)
This commit is contained in:
parent
4030a2e253
commit
29fc4af0fc
1 changed files with 1 additions and 0 deletions
|
@ -60,6 +60,7 @@ void AHT10Component::update() {
|
|||
delay = AHT10_HUMIDITY_DELAY;
|
||||
for (int i = 0; i < AHT10_ATTEMPS; ++i) {
|
||||
ESP_LOGVV(TAG, "Attemps %u at %6ld", i, millis());
|
||||
delay_microseconds_accurate(4);
|
||||
if (!this->read_bytes(0, data, 6, delay)) {
|
||||
ESP_LOGD(TAG, "Communication with AHT10 failed, waiting...");
|
||||
} else if ((data[0] & 0x80) == 0x80) { // Bit[7] = 0b1, device is busy
|
||||
|
|
Loading…
Reference in a new issue