Example 40: BMP280 Pressure Sensor
About 1 min
Example 40: BMP280 Pressure Sensor
Experiment Overview
BMP280 is a high-precision digital pressure/temperature sensor that communicates via I2C interface. It measures atmospheric pressure (300~1100hPa), temperature (-40~+85°C), and estimates altitude. FastBee includes built-in BMP280 driver in Standard / Full firmware.
Note: This feature requires
FASTBEE_ENABLE_I2C_SENSORS=1; disabled by default in Lite firmware.
Hardware Wiring
| Board Label | GPIO Pin | Connected Device |
|---|---|---|
| SDA | GPIO21 | BMP280 SDA |
| SCL | GPIO22 | BMP280 SCL |
BMP280 I2C address: SDO to GND = 0x76, SDO to VCC = 0x77.
JSON Configuration Example
{
"peripherals": [
{
"id": "bmp280_01",
"name": "BMP280 Barometer",
"type": 38,
"enabled": false,
"pins": [21, 22],
"params": {
"category": "bmp280",
"i2cAddress": "0x76"
}
}
]
}Data Channels
| Channel | Field Name | Unit | Description |
|---|---|---|---|
| 0 | temperature | °C | Ambient temperature |
| 1 | pressure | hPa | Atmospheric pressure |
| 2 | altitude | m | Estimated altitude (based on standard pressure) |
Peripheral Execution Linkage
Scenario: Pressure & Temperature Monitoring (Timer Trigger)
Feature: Periodically read BMP280 pressure and temperature data
Web UI Configuration Steps
Step 1: Create Rule
- Click Peripheral Config in the left menu → Switch to Peripheral Execution tab
- Click New Rule button
- Fill in basic configuration:
- Rule Name:
Pressure & Temperature Monitoring - Report Data: ✅ Enabled
- Enable: ✅ Enabled
- Rule Name:
Step 2: Configure Trigger (Timer Trigger)
Click Add Trigger button
Fill in trigger configuration:
Field Value Description Trigger Type Select Timer Trigger Periodic collection Timer Mode Select Fixed Interval Second interval Interval 1010 seconds
Step 3: Configure Action (Sensor Read)
Click Add Action button
Fill in:
- Action Type: Select Sensor Read
- Target Peripheral: Select
bmp280_01 - Data Field:
pressure(pressure)
Click Save button
BMP280 Data Channels
| Channel | Field Name | Unit | Description |
|---|---|---|---|
| 0 | temperature | °C | Ambient temperature |
| 1 | pressure | hPa | Atmospheric pressure (300-1100hPa) |
| 2 | altitude | m | Estimated altitude (based on standard pressure) |
Notes
- Firmware Version: Use Standard / Full firmware, or enable
FASTBEE_ENABLE_I2C_SENSORSin custom build - I2C Sharing: Can share bus with other I2C devices (SDA/SCL)
- Altitude Accuracy: Altitude estimation is based on standard pressure 1013.25hPa; actual calibration needed
- Sampling Interval: 5-10 seconds sampling recommended
- BME280 Compatible: BME280 (with humidity) uses the same address and basic protocol
