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:
parent
5cafb34e32
commit
4f66f97fe6
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue