Source: https://mokxi.com/parts/bmp280
Updated: 2026-11-10

Part

# Pressure and temperature, BMP280

The same sensor without the humidity: pressure, temperature, and so altitude.

See every part

- 4 pins
- 3 settings
- In 1 project
- In 1 lesson

Drawn live by the editor's own code, at the size you see it.

At a glance

## The Pressure and temperature, BMP280 in brief

What it is, and every setting the properties panel gives it.

The BMP280 is the BME280 without the humidity sensor: the same Bosch die and the same purple four-pin breakout, VIN, GND, SCL and SDA, so the two are told apart by the chip id at register 0xD0, 0x58 here and 0x60 on the BME280. A sketch that needs humidity should check it. The module regulates VIN, so 3.3 or 5 V both work; SDA and SCL go to A4 and A5 on an Uno, or GPIO 21 and 22 on an ESP32. The address is 0x76 by default and 0x77 with the strap, and Adafruit_BMP280’s begin() wants it spelled out for a purple board. Mokxi models raw twenty-bit counts, the factory coefficients the driver must apply, temperature first because pressure needs its t_fine, forced and normal modes, oversampling times and the IIR filter. The temperature slider runs from -40 to 85 degrees and pressure from 300 to 1100 hPa; every 12 hPa or so less is about 100 m higher, which is what readAltitude(1013.25) turns it into. The classic mistake is the address. Noise, which oversampling and the filter exist to beat, and SPI mode are not modeled.

Family

Sensors

Pins

4

address

118

temperature

22

pressure

1013.25

Pins

## 4 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

What it does

VIN

Supply. The module has its own regulator, so 3.3 V or 5 V.

GND

Ground.

SCL

I2C clock. The module carries the pull-ups.

SDA

I2C data.

How to use it

## How to use the BMP280 barometer with an Arduino

In the rocket flight computer the BMP280 shares the Uno’s I2C bus with an MPU6050: VIN and GND go to the 5 V and ground rails, and SCL and SDA reach A5 and A4 through two columns of the breadboard. The barometer is at 0x76 and the IMU at 0x68, so the same two wires serve both.

baro.begin(0x76) is the line that matters. Adafruit_BMP280 looks at 0x77 unless told, and checks for chip id 0x58; a BME280 answers 0x60, so begin(0x76, 0x60) reads one of those as a barometer. The sketch then sets normal mode with 16x pressure oversampling and reads readAltitude(1013.25), the height above standard sea-level pressure. To fly it, hold ARM and drag the pressure slider down about 2 hPa, roughly 17 m of climb, and back up.

Part pin

Board pin

VIN

5 V

GND

GND

SCL

A5 (shared with the MPU6050)

SDA

A4 (shared with the MPU6050)

The module regulates VIN, so on an ESP32 it runs from 3.3 V with SDA on GPIO 21 and SCL on 22, and the library calls are the same.

Hold the button

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

The barometer’s setup, from the flight computer

How it is modeled

## What is true about the Pressure and temperature, BMP280, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Modeled

The register map and the reset values: asleep at power-up, data registers at
0x80000 and 0x8000 until something is measured, im_update set for the 2 ms the
chip spends copying its coefficients. Forced mode takes one measurement and goes
back to sleep; normal mode measures, waits the standby time, and repeats. A
measurement takes the datasheet's typical time, from 8 ms at 1x oversampling to
113 ms at 16x, with measuring set while it runs.

ctrl_hum only takes effect at the next write to ctrl_meas , and humidity
oversampling left at 0 means no humidity at all: the register reads its reset value.
Both are straight from the datasheet and both catch people.

Resolution follows oversampling, 16 bits at 1x up to 20 at 16x, and the IIR filter
blends each result into the last, so a slider moved with the filter on is followed
smoothly rather than in a jump.

### Not modeled

Noise. A real reading wanders by a few pascals and a few hundredths of a degree,
which is what oversampling and the filter are for; here more samples change only the
time and the number of bits. The drivers use Bosch's 32-bit pressure formula, since
the smaller boards have no 64-bit multiply, and it reads a few pascals off the 64-bit
one. SPI mode, and so CSB and SDO as pins, are not modeled: this is the I2C
module. The humidity sensor's slow response to a change in the air is not modeled.

From BME280 and BMP280 pressure sensors, in full.

Projects

## See the Pressure and temperature, BMP280 in a project

One built-in project uses it. It opens in the editor, already wired.

Lessons

## Where it turns up in a lesson

One lesson places it in its own circuit.

### Learn articles

1 lesson

- ESP32 I2C Pins: SDA 21, SCL 22, and Custom Pins

Boards

## The boards it is shown on

This board has a built-in project with the Pressure and temperature, BMP280 in it.

- ESP32-C3-DevKitM-1

Boards

## The Pressure and temperature, BMP280 on each board

The pins, the voltage and the code change from board to board. Each page has that board’s wiring and a circuit you can run.

- Arduino Uno and BMP280
- ESP32 and BMP280
- Arduino Nano and BMP280
- Arduino Mega and BMP280
- ESP32-C3 and BMP280
- ESP32-S3 and BMP280
- Raspberry Pi Pico and BMP280
- Arduino Uno R4 and BMP280

Libraries

## Arduino libraries for the Pressure and temperature, BMP280

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

- Adafruit BMP280 Library

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the Pressure and temperature, BMP280

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
