Environmental sensor
BME280 Sensor Documentation
1. Introduction
The BME280 is a high-precision sensor that measures temperature, humidity and atmospheric pressure. It is commonly used in environmental monitoring, weather stations due to its reliability. The sensor communicates via the I2C interface.
2. Technical Characteristics
- Temperature Range: -40 to 85°C (accuracy of ±1.0°C)
- Humidity Range: 0% to 100% RH (accuracy of ±3% RH)
- Pressure Range: 300 to 1100 hPa (accuracy of ±1 hPa)
- Operating Voltage: 1.8V to 3.6V
- Interface: I2C (default) or SPI
- Dimensions: 2.5 mm x 2.5 mm x 0.93 mm
- Power Consumption: 0.1 µA in sleep mode, 1.8 µA at 1 Hz sampling rate
3. Pin Configuration

4. Using BME280 with CircuitPython
Library Installation:
-
The library installs automatically if you use a code block that uses the DHT11 backpack in Elioblocs.
-
Otherwise Install the library
Adafruit CircuitPython BME280using the Library Bundle CircuitPython from Adafruit.
Code Example:
import time
import board
import adafruit_bme280
# Initialize BME280 sensor
i2c = busio.I2C(board.IO9, board.IO8)
bme280 = adafruit_bme280.Adafruit_BME280_I2C(i2c, address=0x76)
# Optionally set sea-level pressure based on your location
bme280.sea_level_pressure = 1013.25
while True:
print(f"Temperature: {bme280.temperature:.1f} °C")
print(f"Humidity: {bme280.humidity:.1f} %")
print(f"Pressure: {bme280.pressure:.1f} hPa")
print(f"Altitude: {bme280.altitude:.2f} meters")
time.sleep(2.0)
Notes:
- The
sea_level_pressurevariable can be adjusted based on your location for more accurate altitude readings.
5. Common Applications
- Weather stations
- Environmental monitoring
- Altimeters
- IoT devices for climate and air quality monitoring