What it is: The BME680 measures temperature, humidity, pressure AND a gas-resistance value that tracks volatile organic compounds (VOCs) — breath, cooking, solvents, etc. Higher gas resistance = cleaner air.
How it works: A tiny heated plate changes resistance in the presence of VOCs. The library warms the plate and reads the resistance each cycle. This sketch shows raw gas resistance in kΩ (a true IAQ index needs Bosch's BSEC library and a burn-in period).
Wiring (shared I2C bus with the OLED):
BME680 SDA -> GPIO4
BME680 SCL -> GPIO5
BME680 VCC -> 3V3
BME680 GND -> GND
OLED VCC=3V3, GND=GND, SDA=GPIO4, SCL=GPIO5
Libraries: "Adafruit BME680 Library" (installs "Adafruit BusIO" and "Adafruit Unified Sensor"), plus "Adafruit SSD1306" and "Adafruit GFX Library".
On screen / Serial: temperature, humidity and gas resistance (kΩ). Breathe on it — gas resistance drops, then recovers in clean air.
Gotchas: The gas reading needs a few minutes to stabilise after power-on (the heater burns off residue). Address is 0x76 or 0x77. Gas resistance is a relative trend, not an absolute pollution number.