Ordered on weekdays before 14:00 = shipped the same day and delivered the next day in 98% of cases. Free returns 30-day reflection period 1-year warranty

Wiring diagram and code example

How to connect the 3-in-1 sensor Temperature Humidity and Air Pressure | 5V | I2C | Bosch BME280 to an Arduino UNO or ESP32, with an example sketch you can upload straight away.

BME280 Temperature, Humidity & Pressure Sensor

This project reads temperature, relative humidity, and barometric pressure using the BME280 sensor over I2C. The environmental readings are printed to the Serial Monitor every two seconds. Simply connect the sensor directly to the Arduino Uno 5V, GND, and I2C pins.

Wiring diagram: 3-in-1 sensor Temperature Humidity and Air Pressure | 5V | I2C | Bosch BME280 on an Arduino UNO
Wiring diagram · Click to enlarge
Connection table: 3-in-1 sensor Temperature Humidity and Air Pressure | 5V | I2C | Bosch BME280 on an Arduino UNO
Connection table · Click to enlarge
BME280_Temperature_Humidity_Pressure_Sen.ino · compiled and verified
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : BME280 Temperature, Humidity & Pressure Sensor
 *  Board     : Arduino UNO (arduino:avr:uno)
 *  Parts     : Bosch BME280 5V 3-in-1 sensor Temperature Humidity and Air Pressure
 *  Libraries : Adafruit BME280 Library 2.3.0, Adafruit Unified Sensor 1.1.15
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>

Adafruit_BME280 bme;

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    delay(10);
  }

  Serial.println(F("--- BME280 Sensor Test ---"));

  // Try I2C address 0x76 first, fallback to 0x77 if needed
  if (!bme.begin(0x76) && !bme.begin(0x77)) {
    Serial.println(F("Could not find a valid BME280 sensor! Check wiring."));
    while (1) {
      delay(100);
    }
  }

  Serial.println(F("BME280 sensor initialized successfully."));
}

void loop() {
  float temperature = bme.readTemperature();
  float humidity = bme.readHumidity();
  float pressure = bme.readPressure() / 100.0F; // Convert Pa to hPa

  Serial.print(F("Temperature: "));
  Serial.print(temperature, 2);
  Serial.println(F(" °C"));

  Serial.print(F("Humidity:    "));
  Serial.print(humidity, 2);
  Serial.println(F(" %"));

  Serial.print(F("Pressure:    "));
  Serial.print(pressure, 2);
  Serial.println(F(" hPa"));

  Serial.println(F("---------------------------"));
  delay(2000);
}

Required libraries: Adafruit BME280 Library 2.3.0, Adafruit Unified Sensor 1.1.15

Wiring diagram and example code generated by Codey.online — https://www.codey.online

BME280 Weather Sensor on ESP32

Reads ambient temperature, relative humidity, and barometric pressure from the Bosch BME280 sensor via I2C. The readings are output to the Serial Monitor every two seconds. Powered directly from the ESP32 3.3V pin to ensure safe I2C voltage levels.

Wiring diagram: 3-in-1 sensor Temperature Humidity and Air Pressure | 5V | I2C | Bosch BME280 on an ESP32 DevKit V1
Wiring diagram · Click to enlarge
Connection table: 3-in-1 sensor Temperature Humidity and Air Pressure | 5V | I2C | Bosch BME280 on an ESP32 DevKit V1
Connection table · Click to enlarge
BME280_Weather_Sensor_on_ESP32.ino · compiled and verified
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : BME280 Weather Sensor on ESP32
 *  Board     : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
 *  Parts     : Bosch BME280 5V 3-in-1 sensor Temperature Humidity and Air Pressure
 *  Libraries : Adafruit BME280 Library 2.3.0, Adafruit Unified Sensor 1.1.15
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>

Adafruit_BME280 bme;

void setup() {
  Serial.begin(115200);
  while (!Serial) delay(10);

  Serial.println("BME280 Sensor Test");

  // Default I2C address is 0x76 or 0x77
  if (!bme.begin(0x76) && !bme.begin(0x77)) {
    Serial.println("Could not find a valid BME280 sensor, check wiring!");
    while (1) delay(10);
  }

  Serial.println("BME280 sensor initialized successfully.");
}

void loop() {
  float temperature = bme.readTemperature();
  float humidity = bme.readHumidity();
  float pressure = bme.readPressure() / 100.0F; // hPa

  Serial.print("Temperature: ");
  Serial.print(temperature, 1);
  Serial.print(" °C | Humidity: ");
  Serial.print(humidity, 1);
  Serial.print(" % | Pressure: ");
  Serial.print(pressure, 1);
  Serial.println(" hPa");

  delay(2000);
}

Required libraries: Adafruit BME280 Library 2.3.0, Adafruit Unified Sensor 1.1.15

Wiring diagram and example code generated by Codey.online — https://www.codey.online

3-in-1 sensor Temperature Humidity and Air Pressure | 5V | I2C | Bosch BME280

NOTE 5V version. Suitable for Arduino UNO, Arduino NANO, Arduino MEGA and other Arduino boards or microcontrollers that run on 5V.

GY-BME280 is a Breakout Board with a Bosch Sensortec ME280 Temperature, Humidity and Light Pressure sensor.

- I2C pull-up resistors
- Includes 4 pin header 2.54mm

BME280 Features
- Sensor brand: Bosch
- Sensor size 2.5mm x 2.5mm x 0.93mm metal cover LGA
- Digital interface I2C (up to 3.4 MHz) and SPI (3 and 4 wire, up to 10 MHz)
- Supply voltage: 5V
- Current consumption 1.8 uA @ 1Hz humidity and temperature, 2.8 uA @ 1Hz pressure and temperature. 3.6 uA @ 1Hz humidity, pressure and temperature and 0.1 uA in sleep mode
- Temperature sensor range -40 / +85 C,
- Humidity range; 0 - 100% rel. Humidity
- Air pressure range: 300- 1100 hPa
- I2C

  • I2C interface
  • SPI support
  • 5V power supply
  • Suitable for Arduino

Why choose this product?

  • Three measurements – Measures temperature, humidity and air pressure.
  • Suitable for 5V – For Arduino boards and microcontrollers at 5V.
  • Includes pull-ups – I2C pull-up resistors are already included.
  • Header included – Includes 4-pin 2.54mm header.
Specifications
Pin spacing2,54 mm
Suitable forArduino UNO, Arduino NANO, Arduino MEGA and other 5V Arduino boards or microcont
Temperature range-40 / +85 C
Supply voltage5V
Power consumption1.8 uA @ 1Hz
Max. humidity0 - 100% rel. humidity
Sensor size2.5mm x 2.5mm x 0.93mm
I2C frequencyup to 3.4 MHz
SPI frequencyup to 10 MHz
SPI wire3 and 4 wire
Air pressure300- 1100 hPa
Sleep mode current consumption0.1 uA

In the package

  • GY-BME280 breakout board
  • 4 pin header 2.54mm

Reviews

★★★★★ 5,0/5 2 reviews
  • ★★★★★Jan

    fine and on time

  • ★★★★★Jack Veraart

    I have several of them and use them with wemos esp and raspberry pi. Very fun to make something with these.

Write a review
Your rating

Shipping & returns

Shipping

  • Parcel with track & trace€ 7,701 working day
  • Pick up at PostNL location€ 7,40Within 24 hours
  • Letterbox parcel 48 hours€ 3,70Within 2 business days
  • Letterbox parcel 24 hours€ 4,55Within 24 hours
  • Pick up in storeFree
All about shipping

Returns

Not satisfied? You have 30 days after delivery to return the product.

All about returns

Recently viewed