Pressure & Altitude
Interfacing BME280 Pressure & Altitude with Arduino Uno
What is the BME280?
The BME280 is Bosch's combined humidity, pressure, and temperature sensor, built on the same die family as the BMP280 with a humidity element added on top. It talks over I2C (up to 3.4MHz) or SPI (up to 10MHz), and a single read gives you all three environmental values with factory-calibrated compensation coefficients baked into onboard registers — the sensor itself does the raw-to-real-world math via the calibration data, and your library just applies it.
It is the standard choice for weather stations, altitude estimation (via barometric pressure), greenhouse monitoring, and indoor air-comfort projects. The catch that trips people up is address selection and voltage: most breakout boards default to I2C address 0x76 or 0x77 depending on how the SDO pin is tied, so two identically-wired boards on one bus will collide unless you change one address. Also, the bare BME280 chip is 3.3V logic only — always confirm your breakout has an onboard regulator before wiring it to a 5V board.
Specifications
| Interface | I2C (up to 3.4MHz) or SPI (up to 10MHz), selectable |
| I2C address | 0x76 (SDO to GND) or 0x77 (SDO to VCC) |
| Operating voltage | 1.71–3.6V (breakout boards commonly add a 5V-tolerant regulator) |
| Humidity range | 0–100% RH, ±3% accuracy |
| Pressure range | 300–1100 hPa, ±1 hPa absolute accuracy |
| Temperature range | −40°C to 85°C, ±1°C accuracy |
| Current consumption | 3.6µA @ 1Hz (humidity+temp), 0.6µA in sleep mode |
| Response time | ~1s (humidity 63% step response) |
BME280 Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power — 3.3V (check breakout for 5V-tolerant regulator) |
| 2 | GND | Ground |
| 3 | SCL | I2C clock (or SPI SCK) |
| 4 | SDA | I2C data (or SPI MOSI) |
| 5 | CSB | SPI chip select — tie HIGH (to VCC) to force I2C mode |
| 6 | SDO | I2C address select (GND = 0x76, VCC = 0x77) or SPI MISO |
For I2C mode (the common case), tie CSB to VCC and use SDO only to pick the address. For SPI mode, all 6 pins are active and CSB becomes the active-low chip select.
Setting Up BME280 with Arduino Uno
Library
Adafruit BME280 Library by Adafruit
Arduino IDE → Library Manager → search "Adafruit BME280"
Wiring
| Component pin | Arduino Uno pin | Note |
|---|---|---|
| VCC | 5V (if module has onboard regulator) or 3.3V | — |
| GND | GND | — |
| SCL | A5 | — |
| SDA | A4 | — |
| CSB | VCC (forces I2C mode) | — |
Example code
Uno's Wire library defaults to A4/A5. Confirm your breakout is 5V-safe before powering from VCC pin.
Related Guides & Projects

Arduino Uno R3 Pinout: Every Pin Explained (Digital, Analog, PWM, Power)
Complete Arduino Uno R3 pinout reference: all 14 digital pins, 6 analog inputs, PWM, UART, SPI, I2C, AREF, and power rails explained with wiring tips and common mistakes.

Ultimate Arduino Mega 2560 Pinout Guide: Complete Power & I/O Reference
Master the Arduino Mega 2560 pinout. Detailed reference for all 54 digital pins, 16 analog inputs, PWM, UARTs, SPI, I2C, interrupts, and power. Includes a printable table and practical wiring tips.

Interfacing HC-SR04 Ultrasonic Sensor with Arduino
Measure distance accurately using ultrasonic sound waves and an Arduino Uno — no complex math, no expensive hardware.
HC‑SR04 Ultrasound Distance Measurement with Arduino – Parking Alert (LCD & Buzzer)
Learn HC‑SR04 ultrasound distance measurement with Arduino Uno. Build a parking alert system with 16x2 LCD and buzzer – shows distance and beeps faster as you approach.