change loop to delay so ESP8266 can do Wi-Fi tasks

delay(1) allows ESP8266 to do Wi-Fi tasks. It is recommended to not make any code that blocks this for more than 20/50 microseconds.
This commit is contained in:
pm73 2017-02-08 12:32:22 +01:00 committed by GitHub
parent 5cafb34e32
commit 4f66f97fe6
1 changed files with 2 additions and 1 deletions

View File

@ -303,7 +303,8 @@ void Adafruit_BME280::takeForcedMeasurement()
write8(BME280_REGISTER_CONTROL, _measReg.get());
// wait until measurement has been completed, otherwise we would read
// the values from the last measurement
while (read8(BME280_REGISTER_STATUS) & 0x08);
while (read8(BME280_REGISTER_STATUS) & 0x08)
delay(1);
}
}