All wiring guides

Free wiring guides

Wire the BME280 sensor to the ESP32-C3

Temperature, humidity and pressure sensor, BME280, I2C. Measures the air: temperature, humidity and pressure.

When buying: BME280, not BMP280: the BMP has no humidity. The 3.3 V four-pin board.

Which pin goes where

On the partOn the ESP32-C3
VCC3V3
GNDGND
SCLGPIO 7
SDAGPIO 6

Wire it with the USB cable unplugged. Follow the names printed on your own part: makers sometimes reorder the pins.

In 3D

Example sketch

// Temperature, humidity and pressure sensor, BME280, I2C
// on the ESP32-C3 Super Mini
// https://stem.manusignal.com/en/parts/bme280-esp32-c3
#include <Wire.h>
#include <Adafruit_BME280.h>

const int PIN_SDA = 6;
const int PIN_SCL = 7;

Adafruit_BME280 bme;

void setup() {
  Serial.begin(115200);
  Wire.begin(PIN_SDA, PIN_SCL);
  if (!bme.begin(0x76, &Wire) && !bme.begin(0x77, &Wire)) Serial.println("BME280 not found");
}

void loop() {
  Serial.print(bme.readTemperature(), 1);
  Serial.print(" C  ");
  Serial.print(bme.readHumidity(), 0);
  Serial.print(" %  ");
  Serial.print(bme.readPressure() / 100.0, 0);
  Serial.println(" hPa");
  delay(1000);
}
  • Tools > Board > ESP32C3 Dev Module (USB CDC On Boot: Enabled), then Tools > Port and choose the board's port.
  • Adafruit BME280 Library: install it from Sketch > Include Library > Manage Libraries.

This sketch is compiled for the board before the page is published. It has not been run on real hardware by us.

What you should see

Open the Serial Monitor at 115200. It prints temperature, humidity and pressure once a second.

If it does not work

The sketch says the sensor is not found.
Try address 0x77 instead of 0x76. If humidity reads 0, the part is a BMP280.

The same part on the ESP32-S3

More parts on the ESP32-C3