Fix “Could not find a valid BME280 sensor, check wiring!”
The library got no reply at 0x76/0x77, or the chip is a BMP280 (ID 0x58). Check the I2C address, wiring and which chip you actually have.
Community draft — report a mistake
What you see
Could not find a valid BME280 sensor, check wiring, address, sensor ID!
SensorID was: 0x58
ID of 0xFF probably means a bad address, a BMP 180 or BMP 085
ID of 0x56-0x58 represents a BMP 280,
ID of 0x60 represents a BME 280.
ID of 0x61 represents a BME 680.Could not find a valid BME280 sensor, check wiring, address, sensor ID!
SensorID was: 0x58
ID of 0xFF probably means a bad address, a BMP 180 or BMP 085
ID of 0x56-0x58 represents a BMP 280,
ID of 0x60 represents a BME 280.
ID of 0x61 represents a BME 680.
The Adafruit BME280 library checks the chip ID after connecting. This message means either no device answered at that address, or a device answered with the wrong ID — very often a BMP280 sold as a BME280.
Quick fix — try in order
- 1
Run an I2C scanner
It shows whether anything answers and at which address — see I2C device not found.
- 2
Pass the right address
Most purple modules use 0x76; Adafruit boards use 0x77. Call bme.begin(0x76) or bme.begin(0x77).
- 3
Check the sensor ID
If the message says SensorID 0x58, your module is a BMP280 (no humidity). Use the BMP280 library instead.
- 4
Check SDA/SCL and power
ESP32: SDA = GPIO21, SCL = GPIO22. Uno: A4/A5. Power at 3.3 V unless the module has a regulator.
Why it happens
BMP280 sold as BME280
They look identical. A BME280 has a square metal can and measures humidity; the BMP280 is cheaper and often mislabelled.
Wrong address
The SDO pin selects 0x76 (LOW) or 0x77 (HIGH). The library default may not match your board.
SPI mode
On 6-pin modules, CSB must be HIGH (or unconnected with a pull-up) for I2C mode.
Board-specific notes
BME280 component: Pinout, addresses and voltage notes are on the BME280 page.
Did this fix it?
Thanks — that helps us keep this page right.