BME280 on ESP32-C3 setup issues

This is my first time trying more custom ESP device configurations, so hopefully I’m not being too dense - but that’s likely. I’ve flashed Sonoff, Athom, and Martin Jerry Tasmota devices with ESPHome before, and done a lot of configs without issue, but this is the first time working with dev boards to this extent.

I have a seeed studio ESP32-C3 I’m trying to setup a BME280 on. I think I’m struggling with the right pins and the config. I got temperature and pressure working (no humidity - I’m aware of the issues with BME vs BMP, I’ll troubleshoot that more when I at least get the other sensor consistent…). However, I used pins GPIO08 and 09 for this, which throws the following errors:

WARNING GPIO9 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO8 is a strapping PIN and should only be used for I/O with care.

I’m not sure if I’m using the right pins, or I should be using other pins that I haven’t been successful in figuring out. I decided on this pins based on the i2c portion of this page: Pin Multiplexing | Seeed Studio Wiki
When I tried other pins previously, I would just get errors in the ESP logs. However, is it going to be an issue moving forward with these pins?

Here’s my config related to the BME:

i2c:
  sda: GPIO09 
  scl: GPIO08
  scan: true
  id: bus_a
   
sensor:
  - platform: bme280_i2c
    temperature:
      name: "Temperature"
      oversampling: 16x
    pressure:
      name: "Pressure"
    humidity:
      name: "Humidity"
    update_interval: 60s
    i2c_id: bus_a
    address: 0x76

This is the pinout diagram of my board, so GND and 3v3, and then SDA to GPIO09 and SCL to GPIO08. With these pins I do eventually get the temperature and pressure data in HA (it takes a few minutes for the first sync), but my concern is with the message I get about using those pins, and the fact that I get no humidity. I ordered a GY-BME280-3.3 from https://www.aliexpress.us/item/3256804341669591.html?spm=a2g0o.order_list.order_list_main.37.4acb1802pEfoKB&gatewayAdapt=glo2usa .
It looks like the BME based on other posts I’ve found. Pictures of my board:


Given I’m not yet certain I have the pins properly configured, I am not planning on giving up hope that I got the right board yet.

Any help would be greatly appreciated, thanks!

ESP32 pinout reference

More than likely it a BMP280. Many of us have been caught out by that.

It’s an ESP32-C3, pinout reference. I have tried multiple pins on the board, and can’t get it to work, so there’s something about that board I’m not understanding, hence the question. A pinout for a different board isn’t super helpful.

As a further data point, however, I did also have an ESP32 board, which I was able to get the BME280 working on quickly - with humidity. So confirmed it’s a BME280, and the issue is just not properly understanding what the pins should be to an ESP32-C3 board.

Seed studio marks Gpio6 / 7 for I2C, no idea why (neither why not). Generally, for esp32-c3 gpio3 and 10 should be least restricted pins of all.

Gpio 2,8 and 9 are strapping pins. They restrict the use on boot (setting the boot mode), but are free to use after that.

1 Like

You can eliminate the message, by telling esphome that you know what you are doing and know you are using a strapping pin, but are using it in a way that is consistent with the constraints (or you can just ignore the warning, since it isn’t an actual error and is just a warning to keep you safe).

ignore_strapping_warning

Strapping Pins - ESP32-C3 Wireless Adventure: A Comprehensive Guide to IoT.
That link says as long as you are not pulling those pins low, it should boot normally, so it seems your usage should be fine. It is also what Seeed Studio says to use, so should be fine.

For the no humidity, welcome to the world of you don’t always get what you paid for from some sites. Neither box (P nor E) is checked so you don’t know which one you have. After looking inside the box, you can see that you very likely have the P version. Use a Sharpie and mark that and you won’t question your results anymore.

Maybe try a more reputable site with a decent return policy for future purchases or more fun when you look inside the box.

1 Like

Going by this 6 year old analysis then a part with a “K” is a BMP and a part with a “U” is a BME. This link also shows the physical difference.

So it looks like your one should be a BME.

1 Like

How do you get it to work at all as in the pictures there are no pins soldered in?

The pictures were just to show that it looked like a BME. But nothing was soldered, using dupont cables while figuring it out.

Thank you! 6 and 7 did the trick! I thought I had already tried those, but I guess I missed those in all my attempts.

@neel-m It was a BME, it worked immediately an on ESP32, all the issues just turned out to be my inability to find the right pins on the ESP32-C3.

Thanks all, learned a lot on this one. :slight_smile:

Good to know, thanks for sharing your results. That is strange that it worked for temp and pressure but not humidity. I have only ever seen them fail completely or work completely.

Nice that it made it work.
I would be surprised if it doesn’t work with 3 and 10 as well.