-
Notifications
You must be signed in to change notification settings - Fork 13
waitForReadings()
Arnd edited this page Dec 12, 2020
·
3 revisions
waitForReadings();
This call doesn't return until the currently active conversion process is complete. The getSensorData() function will also wait until the active conversion is complete; this call allows the waiting to be done in the user program rather than in the library.
BME680_Class BME680; // Instantiate class
...
while (!BME680.begin()) { // Find on I2C bus
Serial.println("Error, unable to find BME680."); // Show error message
delay(5000); // Wait 5 seconds
} // of if-then we can't initialize or find the device
BME680.setOversample(TemperatureSensor,Oversample16); // 16x sampling to temperature
BME680.setOversample(HumiditySensor,SensorOff); // Don't measure humidity
BME680.setOversample(PressurSensor,Oversample8); // 8x oversampling for pressure
uint8 deviceMode = BME680.mode(NormalMode); // Set normal mode
int32_t temperature,humidity,pressure,gas;
BME680.getSensorData(temperature,humidity,pressure,gas);
BME680.waitForReadings(); // Wait for any conversions to complete before continuing
Overview
Installation
Class Instantiation
begin()
setOversampling()
setIIRFilter()
setGas()
getSensorData()
getI2CAddress()
waitForReadings()
measuring()
triggerMeasurement()
reset()
-none-
Modes
Sensors
Oversampling
IIR Filters
I2CDemo.ino
SPIDemo.ino
SoftSPIDemo.ino
TwoDevicesI2CDemo.ino
SDLoggerSPIDemo.ino
ESP32FeatherWiFiDemo.ino