Skip to content

inactiveTime()

Arnd edited this page Dec 11, 2020 · 4 revisions

[inactiveCode=] inactiveTimer([inactiveTimeSetting]);


This sets or returns the current inactiveTime setting which determines, in normal mode how long to pause between making active measurements. Either the enumerated type or numeric values as listed here can be used:

0 or inactiveHalf to use 0.5ms
1 or inactive63ms to use 62.5ms
2 or inactive125ms to use 125ms
3 or inactive250ms to use 250ms
4 or inactive500ms to use 500ms
5 or inactive1000ms to use 1000ms
6 or inactive10ms to use 10ms
7 or inactive20ms to use 20ms

Any other value is ignored.


Example:

BME280_Class BME280;  // Instantiate class    
...    
while (!BME280.begin()) {                          // Find on I2C bus
  Serial.println("Error, unable to find BME280."); // Show error message
  delay(5000);                                     // Wait 5 seconds 
} // of if-then we can't initialize or find the device
uint8 deviceMode = BME280.mode(NormalMode); // Set normal mode
BME280.inactiveTime(inactive250ms); // Set inactive time between measures
Clone this wiki locally