ELECFREAKS Octopus BME280 Pressure Sensor is an electric brick, which has an integrated temperature sensor, air pressure sensor, and humidity sensor onboard. We can use it to measure humidity, temperature, and air pressure, or even to calculate the altitude according to the measured air pressure.
Low power consumption and small size.
3mm standard positioning hole.
Rated 3.3v power supply, which is enough to support micro:bit.
Support I2C and SPI protocol.
Connect the sensor to the I2C connector on octopus:bit using a jumper cable.
Insert micro:bit into the edge slot of octopus:bit.
Click to open Makecode, write your code to read air pressure values, and display it on the micro:bit screen.
Link of the whole program: https://makecode.microbit.org/_cPih8ybrDXuz
You can also download it from the page below.
Air pressure values are scrolling on the micro:bit screen with unit mb.