Reference
BME680
Gas, temperature, humidity, pressure.
- Connects over
- I²C
- Address
- 0x76 (or 0x77)
- Made by
- Bosch Sensortec
- Datasheet
- bosch-sensortec.com
Use it
hardware {
device bme680: BME680
}
every 1s {
let value: float = bme680.temperature()
log("bme680", "temperature={value}")
}
On its own, the declaration puts the BME680 on the first I²C bus (SDA 21, SCL 22 on the ESP32) at 0x76. To choose the pins or the address, declare the bus and attach the device: device bme680: BME680 on i2c0 at 0x77 with i2c i2c0(sda: 21, scl: 22).
Methods
-
bme680.temperature() -> float
Temperature in °C
-
bme680.humidity() -> float
Humidity %
-
bme680.pressure() -> float
Pressure in hPa
-
bme680.gas() -> int
Gas resistance
Wiring
| Pin | Connect to |
|---|---|
VCC | 3.3V or 5V |
GND | Ground |
SDA | Pull-up to VCC (often on breakout board) |
SCL | Pull-up to VCC |
CSB | Tie to VCC for I²C |
SDO | Address select: GND=0x76, VCC=0x77 |
Specifications
- Voltage
- 1.71V – 3.6V
- Current
- 0.15 μA sleep, ~3.7 mA during gas measurement
- Temp
- −40°C to +85°C ±1.0°C
- Humidity
- 0–100% RH ±3%
- Pressure
- 300 – 1100 hPa ±0.6 hPa
- Gas
- VOC / IAQ index (relative, not ppm)
Tips
- Gas reading is relative IAQ — needs Bosch's BSEC library for calibrated ppm-equivalent values.
- First gas readings drift for ~5 minutes after power-on — sensor element is heating up.
- Power-cycling resets the IAQ baseline; keep it powered continuously for stable readings.
Alternatives worth knowing:
- SCD30: Real CO₂ (NDIR) — accurate ppm but bigger and pricier.
- BME280: Drop the gas sensor if you only need T/H/P.