Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BME280 SensorID is 0x255 #1

Open
GHBLoos opened this issue Apr 3, 2021 · 5 comments
Open

BME280 SensorID is 0x255 #1

GHBLoos opened this issue Apr 3, 2021 · 5 comments

Comments

@GHBLoos
Copy link

GHBLoos commented Apr 3, 2021

Hi,

II have several BME280's that stopped working and gave error below.

Could not find a valid BME280 sensor. Check wiring, address, and sensor ID.
SensorID is: 0x255
0xFF: is a BMP180 or BMP085, or a bad address
0x56-0x58 is a BMP280
0x60 is a BME280
0x61 is a BME680

Google brought me at your Github where I read your readme.md.

2020/03/04 Update: Trying to update from the 1.1.0 version of the BME280 library to the 2.0.1 version, which notes a breaking change of dumbing down the sensor detection. Currently in 1.1.0 my Trace logs show Wire SensorID was: 0x96 whereas I think it's expecting 0x77 or 0x76. After updating the library though the trace shows the Wire SensorID was: 0x255. I had to update the signature to bme280.begin(0x76, &Wire) to get it working, and then it worked just as it used to.

Did you have the same error, and if you solved it, how exactly did you do that?

Gaston

@kubedzero
Copy link
Owner

That sounds as if we might have been encountering the same error. By default, when you call bme280.begin() it will do a search for sensors with the ID 0x60. However, the BME280 sensor I had (as discovered by doing an I2C scan) actually didn't have 0x60 as an address and instead had 0x76.

By changing my code from bme280.begin() to bme280.begin(0x76, &Wire) I was able to tell the BME280 library exactly what sensor ID to look for, and that fixed the issue.

https://playground.arduino.cc/Main/I2cScanner/ is the scanner I used to confirm the BME280 sensor address/ID

@GHBLoos
Copy link
Author

GHBLoos commented Apr 3, 2021

I can't get it to work right now.
This part in the code I use:
debugI("SensorID is: 0x%d", adafruit_bme280_->sensorID());
results in 0x255, but I think that should be formatted to hex, so 0xFF, right?

@kubedzero
Copy link
Owner

When the BME280 library reports that the sensorID is 0x255, it's most probably an error and not the actual sensorID.

Did you run the I2cScanner library, and if so, can you list its output here?

@GHBLoos
Copy link
Author

GHBLoos commented Apr 3, 2021

No I2C devices found

Scanning...

@kubedzero
Copy link
Owner

kubedzero commented Apr 3, 2021

It sounds to me then as if the issue is in hardware, aka the Arduino is not picking up anything connected to I2C.

If you unplug the BME280 entirely, I bet you'll see the same behavior both from your own code and the I2C scanner.

I'd maybe check the wiring next, but at this point considering the I2CScanner couldn't find the BME280 either, I don't think it's an issue with software.

Edit: You could also try sensor ID 0x96 or 0x77 (assuming you've already tried 0x76) just to cover the spectrum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants