What it is: The CCS811 is a digital air-quality sensor that outputs an equivalent CO2 (eCO2, 400–8192 ppm) and total volatile organic compounds (TVOC, 0–1187 ppb). Unlike the MQ sensors, it gives real digital numbers over I2C.
How it works: An onboard metal-oxide sensor plus a microcontroller compute eCO2 and TVOC and expose them over I2C at address 0x5A. Shares SDA/SCL with the OLED.
Wiring (shared I2C bus with the OLED):
CCS811 SDA -> GPIO4
CCS811 SCL -> GPIO5
CCS811 VCC -> 3V3
CCS811 GND -> GND
CCS811 WAKE -> GND (many boards need WAKE tied low to enable I2C)
OLED VCC=3V3, GND=GND, SDA=GPIO4, SCL=GPIO5
Libraries: "Adafruit CCS811 Library" (installs "Adafruit BusIO"), plus "Adafruit SSD1306" and "Adafruit GFX Library".
On screen / Serial: eCO2 in ppm and TVOC in ppb.
Gotchas: The CCS811 needs ~20 minutes of run-in on first use and a few minutes each start-up before numbers settle. Remember to tie WAKE to GND. It self-heats, so keep it away from your temperature sensors.