BME280 with the "new" i2c_master_bus

bkneer
Posts: 1
Joined: Wed Jul 02, 2025 9:18 am

BME280 with the "new" i2c_master_bus

Postby bkneer » Wed Jul 02, 2025 9:33 am

Hello,
after using ESP32 for a long time I've got the idea to switch to the esp-idf...
My first idea was to get a BME280 sensor working on I2C.
For this I added the component eespressif/bme280: ^0.1.1 to my setup and tried my best with the i2c_master_bus configuration. I was always ending in a reset loop due to a NULL pointer (I guess it was when bme280 tries to do the defaul config for the device).

I've tried the "old" config using i2c_bus_config and my basic example worked.
So my question would be what went wrong with the i2c_master_bus configuration? Do I miss something? I've found several similar examples on google but none of them worked with this new master approach.
Or is the bme component not yet compatible to the new master?

I'm using the esp-idf master 6.0.0... Thanks

nopnop2002
Posts: 362
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

Re: BME280 with the "new" i2c_master_bus

Postby nopnop2002 » Thu Jul 03, 2025 6:17 am

Or is the bme component not yet compatible to the new master?
Yes that right.

This component depends on the i2c_bus library.
The i2c_bus library is a very old library and relies on legacy i2c drivers.

https://github.com/espressif/esp-iot-so ... me280.c#L9

Who is online

Users browsing this forum: ChatGPT-User, PerplexityBot and 2 guests