Zanduino / BME680

Arduino Library to access the Bosch BME680 - temperature, pressure, humidity and gas sensor
GNU General Public License v3.0
37 stars 10 forks source link

how are the readings done? sleep mode? #30

Closed Alain2019 closed 3 years ago

Alain2019 commented 3 years ago

Hi

How is de lebrary doing the readings?

After looking at the source code I have the impression that the sensor is constantly running doing measurements.

Is it possible to let it "sleep" and only measure when needed?

Where in the source code should I look?

SV-Zanshin commented 3 years ago

Each time a call to [getSensorData()](https://github.com/SV-Zanshin/BME680/wiki/getSensorData())
is made a single measurement is triggered. If no calls to this function are me then no measurements are done. So you control how often readings are done; this is also explained on the wiki page for [getSensorData()](https://github.com/SV-Zanshin/BME680/wiki/getSensorData())

Alain2019 commented 3 years ago

Ok, thanks

So if I sleep 15 minutes I have to call getSensorData() twice to get a recent measurement?

BTW. I read the doxygen info.

SV-Zanshin commented 3 years ago

That is correct, the first returned set of values would be stale, 15 minutes old, and the second set would be the recent values.