Component guide · Intermediate · 4 min read
BME688 AI Gas Sensor

Pinout, Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The BME688 from Bosch measures temperature, humidity, pressure and VOC gas like the BME680, and adds gas scanning: it cycles its heater through up to ten temperatures so a trained model can tell gases apart. Wire it over I2C at 0x76 or 0x77 and read it with the same code as the BME680, then use Bosch BME AI-Studio to train smell detection.
Key specs at a glance
- Measures
- Temperature, humidity, pressure, VOC gas resistance
- Gas scanning
- Heater profile of up to 10 steps for AI gas classification
- Temperature / humidity
- ±0.5 °C typical, ±3 % RH
- Pressure
- 300 to 1100 hPa, ±0.6 hPa
- Interface
- I2C (0x76 or 0x77) or SPI
- Supply
- Chip 1.71 to 3.6 V; modules usually 3.3 to 5 V
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1Bosch BME688 4-in-1 Environmental Sensor – Temperature, Humidity, Pressure & AI Gas Detection, I2C/SPI₹1,119
Option 2Adafruit BME688 Temperature, Humidity, Pressure & Gas Sensor – I2C/SPI with Stemma QT₹3,029
Option 3Bosch BME688 4-in-1 Environmental Sensor Module with Cotton Core & Holder – I2C/SPI₹1,359
Option 4Bosch BME688 Environment Sensor Module – Temperature Humidity Pressure VOC I2C₹2,699
Option 5DFRobot BME688 AI Environmental Sensor VOC Temp Humidity Pressure – I2C/SPI₹2,339
Option 6DFRobot Fermion BME688 AI Environmental Sensor (VOC, Temperature, Humidity, Pressure) – I2C/SPI₹1,779
What the BME688 is
The BME688 is pin-compatible with the BME680. Normal readings work the same way. What is new is the heater profile: by heating the sensing layer to several temperatures in turn, the sensor produces a pattern of resistances that depends on which gases are present.
Bosch's BME AI-Studio software trains a small model on those patterns (for example coffee versus normal air, or spoiled food), and the BSEC2 library runs it on an ESP32 or similar board.
BME688 pinout
The pins on the BME688 and what each one does.
| Pin | Function |
|---|---|
| VCC / VIN | Supply, 3.3 to 5 V on modules with a regulator |
| GND | Ground |
| SCL / SCK | I2C clock, or SPI clock |
| SDA / SDI | I2C data, or SPI data in |
| SDO | I2C address select (GND 0x76, VCC 0x77), or SPI data out |
| CS | SPI chip select; high (or open) for I2C |
- VCC / VIN
- Supply, 3.3 to 5 V on modules with a regulator
- GND
- Ground
- SCL / SCK
- I2C clock, or SPI clock
- SDA / SDI
- I2C data, or SPI data in
- SDO
- I2C address select (GND 0x76, VCC 0x77), or SPI data out
- CS
- SPI chip select; high (or open) for I2C
Wiring the BME688
Adafruit, SparkFun and Pimoroni boards default to 0x77; many generic modules use 0x76. Qwiic and STEMMA QT boards plug straight into a matching connector.
| BME688 pin | Arduino Uno | ESP32 |
|---|---|---|
| VCC | 5V (or 3.3V) | 3V3 |
| GND | GND | GND |
| SDA | A4 | GPIO 21 |
| SCL | A5 | GPIO 22 |
| SDO | GND (0x76) or VCC (0x77) | GND (0x76) or VCC (0x77) |
- VCC
- Arduino Uno:
- 5V (or 3.3V)
- ESP32:
- 3V3
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- SDA
- Arduino Uno:
- A4
- ESP32:
- GPIO 21
- SCL
- Arduino Uno:
- A5
- ESP32:
- GPIO 22
- SDO
- Arduino Uno:
- GND (0x76) or VCC (0x77)
- ESP32:
- GND (0x76) or VCC (0x77)
Example code
This reads the BME688 in BME680-compatible mode. For gas scanning and trained models, use the Bosch BME68x and BSEC2 libraries.
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include "Adafruit_BME680.h"
Adafruit_BME680 bme; // also works with the BME688
void setup() {
Serial.begin(115200);
if (!bme.begin(0x76) && !bme.begin(0x77)) { Serial.println("No sensor at 0x76 or 0x77"); while (1); }
bme.setTemperatureOversampling(BME680_OS_8X);
bme.setHumidityOversampling(BME680_OS_2X);
bme.setPressureOversampling(BME680_OS_4X);
bme.setGasHeater(320, 150); // 320 °C for 150 ms
}
void loop() {
if (!bme.performReading()) return;
Serial.print(bme.temperature); Serial.print(" C ");
Serial.print(bme.humidity); Serial.print(" % ");
Serial.print(bme.pressure / 100.0); Serial.print(" hPa gas ");
Serial.print(bme.gas_resistance / 1000.0); Serial.println(" kOhm");
delay(3000);
}Setup and tuning
run it for at least 30 minutes, and for days for BSEC to learn a baseline.
record each smell many times with the BME688 Development Kit or a logging sketch, then train in BME AI-Studio.
BSEC2 needs a 32-bit board such as an ESP32.
keep it away from heat sources and direct breath.
What you need
Shop this list16 of 16 found in our store · ₹30,775
Bosch BME688 4-in-1 environmental sensor: the sensor this guide coversBosch BME688 4-in-1 Environmental Sensor Module with Cotton Core & Holder – I2C/SPI₹1,359Closest match, check the specs
Adafruit BME688 Temperature, Humidity, Pressure & Gas Sensor – I2C/SPI with Stemma QT: another version this guide coversAdafruit BME688 Temperature, Humidity, Pressure & Gas Sensor – I2C/SPI with Stemma QT₹3,029
Bosch BME688 4-in-1 Environmental Sensor Module with Cotton Core & Holder – I2C/SPI: another version this guide coversBosch BME688 4-in-1 Environmental Sensor Module with Cotton Core & Holder – I2C/SPI₹1,359
Bosch BME688 Environment Sensor Module – Temperature Humidity Pressure VOC I2C: another version this guide coversBosch BME688 Environment Sensor Module – Temperature Humidity Pressure VOC I2C₹2,699
DFRobot BME688 AI Environmental Sensor VOC Temp Humidity Pressure – I2C/SPI: another version this guide coversDFRobot BME688 AI Environmental Sensor VOC Temp Humidity Pressure – I2C/SPI₹2,339
DFRobot Fermion BME688 AI Environmental Sensor (VOC, Temperature, Humidity, Pressure) – I2C/SPI: another version this guide coversDFRobot Fermion BME688 AI Environmental Sensor (VOC, Temperature, Humidity, Pressure) – I2C/SPI₹1,779
Pimoroni BME688 4-in-1 Air Quality Breakout (Gas, Temperature, Pressure, Humidity) – I2C/SPI: another version this guide coversPimoroni BME688 4-in-1 Air Quality Breakout (Gas, Temperature, Pressure, Humidity) – I2C/SPI₹2,216
Seeed Studio Studio Grove BME688 Air Quality Sensor AI 4-in-1 Module: another version this guide coversSeeed Studio Grove BME688 Air Quality Sensor AI 4-in-1 Module₹3,639Closest match, check the specs
SparkFun BME688 Environmental Sensor Breakout – Gas/Temp/Humidity/Pressure (Qwiic): another version this guide coversSparkFun BME688 Environmental Sensor Breakout – Gas/Temp/Humidity/Pressure (Qwiic)₹4,854
Waveshare BME688 Environmental Sensor Module – Temperature / Humidity / Pressure / Gas Detection with AI, I2C/SPI, 3.3V/5V Compatible: another version this guide coversWaveshare BME688 Environmental Sensor Module – Temperature / Humidity / Pressure / Gas Detection with AI, I2C/SPI, 3.3V/5V Compatible₹2,729
BME688 Blackboard Environmental Sensor Module – AI-Powered Gas, Temperature, Humidity & Pressure Sensor: another version this guide coversBME688 Blackboard Environmental Sensor Module – AI-Powered Gas, Temperature, Humidity & Pressure Sensor₹1,699
BME688 Stainless Steel Probe Wire 1 Meter – I2C Interface: another version this guide coversBME688 Stainless Steel Probe Wire 1 Meter – I2C Interface₹2,429
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
Solderless breadboard: to build without solderingSolderless Breadboard₹68
Alternatives and when to choose them
- BME680: the earlier version without gas scanning.
- ENS160: gives eCO2 and TVOC directly without a library model.
- VOC and indoor air quality sensors: which VOC sensor to choose.
Try it: I2c pullup calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Expecting it to name a gas without training a model first.
- Running BSEC2 on an Arduino Uno.
- Reading values in the first minutes after power-up.
- Mounting it inside a closed box with no airflow.
Frequently asked questions
Can the BME688 detect a specific gas?
Only after you train a model with BME AI-Studio; out of the box it gives VOC resistance and IAQ.
Is the BME688 compatible with BME680 code?
Yes, the Adafruit BME680 library reads it.
What is its I2C address?
0x76 or 0x77, set by the SDO pin.
Does it measure CO2?
It estimates a CO2 equivalent from VOCs; it is not an NDIR CO2 sensor.
Which board should I use?
An ESP32 or other 32-bit board for BSEC2; any board for basic readings.
Parts for this guide
Bosch BME688 4-in-1 Environmental Sensor – Temperature, Humidity, Pressure & AI Gas Detection, I2C/SPI₹1,119View- ₹3,029View
- ₹1,359View
- ₹2,699View
- ₹2,339View
- ₹1,779View
- ₹2,216View
- ₹3,639View
- ₹4,854View
Waveshare BME688 Environmental Sensor Module – Temperature / Humidity / Pressure / Gas Detection with AI, I2C/SPI, 3.3V/5V Compatible₹2,729View
BME688 Blackboard Environmental Sensor Module – AI-Powered Gas, Temperature, Humidity & Pressure Sensor₹1,699View- ₹2,429View
- ₹389View
- ₹139View
- ₹49View
- ₹68View
Calculators
Terms in this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.
