BMP280 recognized by i2c scanner but not by adafruit library

Hi everyone, I'm building a rocket flight computer with stabilizing wings and blah blah blah.

But when I tried to add the BMP280 to also have a barometric altimeter, the code didn't work. So I tried running the I2C scanner and it found two addresses: 0x76 and 0x68 (MPU6050). Then I tried running a BMP280 test but that didn't work either.

I tried both 3.3V and 5V and used two different sensors to verify that it wasn't defective, but I still haven't solved the problem.

Does anyone have any ideas? I'm using a nano with optiboot


Perhaps if we knew exactly which module you were using someone would be able to venture an informed opinion. A link to the module in use and a picture would be a good start.

The adafruit library uses address 0x77 and works with the adafruit board.
Your board uses address 0x76

So Use:

Adafruit_BMP280 bmp; // I2C
bmp.begin(BMP280_ADDRESS_ALT, BMP280_CHIPID);

i loaded some pictures of the sensor

Indeed you did. I wish they were more in focus so I could read the IC markings. However, based on the shape alone, I can now venture a guess as to why the Adafruit library doesn't find a BMP280.

It's likely because you don't have one. That appears to be a BME280 to my eye. And while its address is the same as a BMP280, the programming will be different.

And why it should respond to address 0x68 is a complete mystery. Perhaps it's not even a BME280 but something else entirely. Or you haven't told us the whole story.

Maybe you didn't understand, but the parenthesis next to 0x68 indicated that this address is that of the MPU6050.
Anyway, thanks, I'll try with the BME280 library.

Have you tried my solution.

I understood. You were being unclear. And not telling us the whole story.

Good luck with your project.

see post #3

Do you know how many models of Arduino there are called "Nano"?

Some of those models have sensors built in to the board. Maybe that's the other address that the scanner sketch picked up?

The Arduino nano is a board, if I had meant something else I would have said Arduino nano ESP32 for example

ah ok sorry, i didn't read it. anyway i tried using bmp.begin(0x76) but nothin changed

No go back and read post #3

Most new forum members don't say anything, they expect other forum members to somehow know that are using, for example, Nano 33 BLE Sense or whatever. So to avoid wasting time or giving the wrong advice, its best to ask for clarification.

i'm sorry i already tried, but again nothing changed. maybe van_der_decken is right and this is a bme280 and not a bmp280.

ah ok sorry, I misunderstood :sweat_smile:

1 Like

Well I2C add addresses are the same but the CHIPID is different.
Try

Adafruit_BMP280 bmp; // I2C
bmp.begin(BMP280_ADDRESS_ALT, 0x60);

Since that is a 3.3V only sensor, applying 5V probably cooked it.

problem solved it's BME. thanks for the help

it's a BME thanks for the suggestion