Incorporating the BME688 gas sensor into the Enviro software is still on our to-do list - I don’t think there’s a Github issue about that one on the go if you wanted to open one? Issues · pimoroni/enviro · GitHub
I think we were going to see if it was possible to pull in the Bosch drivers so we could use the official air quality algorithm, which is why we didn’t manage to implement it in time for launch.
Our current BME68X drivers do read the raw reading from the gas sensor though, so if you wanted to add some code to indoor.py to add that to your reporting in the meantime it should be fairly straightforward. You can read the gas element of the sensor on Enviro like this:
from breakout_bme68x import BreakoutBME68X
from enviro.board import i2c
bme688 = BreakoutBME68X(i2c, address=0x77)
data = bme688.read()
print(data[3])
I was going to have a go at bringing the code across from the other boards tonight but looks like @hel has made it pretty simple for me. When I get a second I will open the GitHub issue if that helps put it on the official roadmap.
So it appears that all required code is present, I was ignorant to the fact the BME688 included the “VOC” sensor. All that was required was adding to the return in the indoor.py file. For those in need simply add to the return definition near the top of the file:
According to the data sheet this returns a resistance in Ohms and not a particle count, but at least is a metric. You can create your own Indoor Air Quality index, see the following GitHub page on how others have done this previously:
I’ll be playing around with some of this once my just recently placed order arrives. It’s going by snail mail so may be a week or more before I get it.