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
- Supports I2C addresses
$76 and $77
- Default and fully configurable initialization
- All parameters defined as constants
- No external dependencies
Funktionen (Deutsch)
- Unterstützt I2C-Adressen
$76 und $77
- Standard- und benutzerdefinierte Initialisierung
- Alle Parameter als Konstanten
- Keine externen Bibliotheken nötig
Installation
- I2C aktivieren (
sudo raspi-config)
- Repository klonen:
git clone https://github.com/RaspberryFpc/BME280-FreePascal-Driver.git
bme280.pas ins eigene Projekt einbinden
Predefined Constants
Mode
| Name | Description | Binary |
| Sleepmode | Sleep mode | %0 |
| Forcedmode | Forced mode | %1 |
| Normalmode | Normal mode | %11 |
Oversampling
| Name | Description | Binary |
| PressureOversampling1 | Pressure x1 | %00100 |
| PressureOversampling2 | Pressure x2 | %01000 |
| PressureOversampling4 | Pressure x4 | %01100 |
| PressureOversampling8 | Pressure x8 | %10000 |
| PressureOversampling16 | Pressure 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