BME280 Free Pascal Driver

Raspberry Pi · I2C · Temperature · Humidity · Pressure · Dewpoint

▶ View Project on GitHub

BME280 GUI Screenshot

Introduction

This project provides a Free Pascal driver for the BME280 environmental sensor. It runs on the Raspberry Pi via I2C and measures temperature, humidity and air pressure. An accurate dewpoint calculation is included.

Features

Funktionen (Deutsch)

Installation

  1. I2C aktivieren (sudo raspi-config)
  2. Repository klonen:
    git clone https://github.com/RaspberryFpc/BME280-FreePascal-Driver.git
  3. bme280.pas ins eigene Projekt einbinden

Predefined Constants

Mode

NameDescriptionBinary
SleepmodeSleep mode%0
ForcedmodeForced mode%1
NormalmodeNormal mode%11

Oversampling

NameDescriptionBinary
PressureOversampling1Pressure x1%00100
PressureOversampling2Pressure x2%01000
PressureOversampling4Pressure x4%01100
PressureOversampling8Pressure x8%10000
PressureOversampling16Pressure x16%10100

Functions

Initbme280

function Initbme280(
  HumidityOversampling,
  PressureOversampling,
  TemperatureOversampling,
  mode,
  Repeattime,
  filter: byte
): integer;

Initbme280_WithDefaults

function Initbme280_WithDefaults: integer;

License

MIT License
Copyright (c) 2025
Permission is hereby granted, free of charge...

Other Projects