zanduino / bme680 Goto Github PK
View Code? Open in Web Editor NEWArduino Library to access the Bosch BME680 - temperature, pressure, humidity and gas sensor
License: GNU General Public License v3.0
Arduino Library to access the Bosch BME680 - temperature, pressure, humidity and gas sensor
License: GNU General Public License v3.0
Hi
I've seen a possible other calibration in you're code (and those from Bosh, versus the BME680 datasheet.
According the datasheet I would expect :
.h
const uint8_t BME680_BIT_H1_DATA_MSK = 0xF0; ///< Mask for humidity (instead of 0x0F)
.cpp
_H1 = (uint16_t)(((uint16_t)coeff_arr2[BME680_H1_MSB_REG] << BME680_HUM_REG_SHIFT_VAL) |
((uint16_t)(coeff_arr2[BME680_H1_LSB_REG] & BME680_BIT_H1_DATA_MSK)>>4) );
_H2 = (uint16_t)(((uint16_t)coeff_arr2[BME680_H2_MSB_REG] << BME680_HUM_REG_SHIFT_VAL) |
((uint16_t)(coeff_arr2[BME680_H2_LSB_REG] & BME680_BIT_H1_DATA_MSK)>>4));
Describe what the feature request is and if it solves an issue or adds functionality
Optimize library code
Describe the solution you'd like
see above
Describe alternatives you've considered
none
Additional context
none
Describe what the feature request is and if it solves an issue or adds functionality
Currently the formatting of the library and example programs is non-standard. Using a standardized tool such as "clang-format" allows for a more legible source code and makes applying pull requests from multiple contributors much easier
Describe the solution you'd like
Add "clang-format" to the GitHub actions to automatically format on commit
Describe alternatives you've considered
none
Additional context
While I like working on a wide screen with the current 120-column width, it is non-standard.
Describe what the feature request is and if it solves an issue or adds functionality
Add environment variables to .travis.yml to allow using a common standardized doxfile
Describe the solution you'd like
as above
Describe alternatives you've considered
None
Additional context
None
Is your feature request related to a problem? Please describe.
I have had a request to add this function to the library, at the moment the library contains no means of reading the current settings.
Describe the solution you'd like
Add the "getOversampling()" function to the library with the same parameters as the setOversampling() function.
Describe alternatives you've considered
None, if the user wants to read the current settings.
Additional context
None required
Hi
after dealing a while with the BME680 I had the feeling that the Temprature out of the readings seems to be to high. After doing some research I found this from Bosch
Looking at a reference thermometer, we can see that our temperature is indeed a few degrees to high. Does that mean the temperature sensor inside the BME680 is inaccurate?
Actually no, it very accurately measures the temperature exactly where it is located on the board. But there also is the issue: our board as most devices contains some heat sources (e.g., MCU, WiFi chip, display, โฆ). This means the temperature on our board is actually higher than the ambient temperature. Since the absolute amount of water in the air is approximately constant, this also causes the relative humidity to be lower on our board than elsewhere in the room.
As BSEC cannot know in which kind of device the sensor is integrated, we have provide some information to the algorithm to enable it to compensate this offset. In the simplest case, we have to deal with an embedded device with a constant workload and approximately constant self-heating. In such a case, we can simply supply a temperature offset to BSEC which will be subtracted from the temperature and will be used to correct the humidity reading as well.from the Integration Guide - Bosch Software Environmental Cluster (BSEC)
Do you have a parameter that this mentioned compensation can be added to the initialisation?
If not is there a plan to integrate it?
Thanks
Martin
Describe what the feature request is and if it solves an issue or adds functionality
Currently a measurement is triggered at the end of a call to getSensorData(). Functionality to control triggering a new measurement and waiting for a measurement to complete should be added to the library. These suggestions are implied from posts and code recommendation from @Alain2019
Describe the solution you'd like
Add a "measuring()" function to return the current state of the BME680 and a "triggerMeasurement()" function to force a new measurement.
Describe alternatives you've considered
n/a
Additional context
n/a
Is your feature request related to a problem? Please describe.
The Bosch BME680 allows for 2 distinct I2C addresses, 0x76 and 0x77.
Describe the solution you'd like
An example program showing how to use 2 devices with I2C would be helpful.
Describe alternatives you've considered
none
Additional context
Hi there @SV-Zanshin
I'd like to start by saying this isn't an issue, more of a request. SparkFun is currently making a breakout for the BME680 and would like to point to your library in our hookup guide. This can sometimes lead to an influx of questions/issues/pull requests on the repository. We are currently considering two options.
Although your library is licensed as GNU, we wanted to ask if you had a preference before we move forward.
Thanks in advance, and excellent work,
Andy England
The gas resistance value should change smell is detected.
The value is static and prints out a negative value in the 2000s. It is a library problem because the gas value changes when using the adafruit BME680 library.
Explain what needs to be done in order to reproduce the problem.
1.Make a sketch that includes the Zanshin BME680 library or use the IC2DEMO
2.Print the gas resistance value in serial monitor.
3.Run code and open serial monitor.
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?
The library should function after doing a reset() when using I2C with a specified address
The reset() is issued, but the library doesn't remember the original begin() parameter value, if specified.
The error is only visible when multiple BME680 devices are present on the bus and the reset() is called on the library with 0x77 address.
Oversampling for temperature changes when calling setOversampling(TemperatureSensor,{value})
Oversampling in the command above changes that pressure oversampling register position
This requires a sample program that reads the Bosch BME680 registers directly
This is causing naming conflict with any classes:
TemperatureSensor, HumiditySensor, PressureSensor, GasSensor
Is your feature request related to a problem? Please describe.
I have had a request to add this function to the library, at the moment the library contains no means of reading the current settings.
Describe the solution you'd like
Add the "getIIRFilter()" function to the library with the same parameters as the setIIRFilter() function.
Describe alternatives you've considered
None, if the user wants to read the current settings.
Additional context
None required
I've browsed through the source code and didn't see where the Gas calibration constants are used. This must be a bug. I recommend reviewing the code and comparing against the original published library from Bosch Sensortek.
Stefan
Is your feature request related to a problem? Please describe.
Since the BME680 can have two possible I2C addresses, it would be good to know which address is being used by the library instance
Describe the solution you'd like
Add a new function, "getI2CAddress()" which will return the current BME680 I2C Address
Describe alternatives you've considered
The alternative is to expose the internal "I2CAddress" variable, but if that is done then the user can change the I2C address determined during instantiation and break the library.
Additional context
none.
The BME680 allows 2 different I2C addresses (0x76 and 0x77). The library currently will check both addresses and use the first one found. But this means that two devices, both using I2C, are not supported. The begin() method should be changed to allow for explicit setting of either address while still being backwards-compatible and allowing no I2C address to be specified.
Is your feature request related to a problem? Please describe.
An additional example program showing how to send BME680 logging data to a web page would be helpful. The ESP32 has built-in WiFi so is a good hardware platform for this example
Describe the solution you'd like
A running example program for the ESP32 microprocessor platform showing BME680 data going to a self-hosted webpage using AJAX
Describe alternatives you've considered
While adding a WiFi breakout to a smaller Arduino is possible, that would require specific programming for the various WiFi breakout boards available. Each example would be for just one WiFi board and be too much effort.
Additional context
None
Curious if your library is handling the mentioned Low Power Mode or simple on/off of the sensor when utilized with battery?
Perhaps I'm literally missing the obvious in your code. ;)
Each call to getSensorData() should return valid data.
After powering up the BME680 and initializing the library, the first returned measurements from getSensorData() are always incorrect.
Correct typographical errors and clean up the formatting in both the library and example programs
Check to make sure that heating and return values for the gas VOC code is correct and then correctly document the features
Change the affected source code so that all of the platforms will compile correctly with Travis-CI
Values for temperature, humidity and pressure should be plausible
Occasionally, the BME680 using the example SPIDemo program, will show correct temperature values but the humidity will read 100% and the pressure will be below 700hPa although it should be close to 1000hPa.
Power down the device and restart. Sometimes the error will be reproducible. It seems to be a non-deterministic occurrence.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.