GATAS documentation
Add a BMP280 pressure sensor
This guide explains how to connect an SPI BMP280 pressure sensor to a GATAS
Pulse device and enable it in GATAS. The GATAS Pulse uses the
WAVESHARE_LITE hardware profile.
Wiring
Connect the BMP280 in SPI mode:
| BMP280 pin | Pico GPIO | Pico physical pin |
|---|---|---|
| 3V3 / VCC | — | 36 |
| GND | Ground | 38 (or another GND pin) |
| CS / CSB | GPIO21 | 27 |
| SCK / SCL | GPIO10 | 14 |
| MOSI / SDI / SDA | GPIO11 | 15 |
| MISO / SDO | GPIO12 | 16 |
Warning
Power the sensor from 3.3 V, not 5 V.
Pin labels vary between BMP280 breakout boards. In SPI mode, SCL is the
clock pin and SDA is the MOSI pin. The BMP280 does not use a BUSY pin.
The BMP280 shares SPI device 0’s clock, MOSI and MISO lines with the Waveshare SX1262 radio. It uses GPIO21 as its own chip-select line.
Check the pin configuration
Note
If you performed a fresh installation with firmware 3.5.0 or newer, the BMP280 pin mapping is included automatically. Skip this section and continue with Enable and calibrate the module. The
curlcommands below are only needed when upgrading an existing installation whose previous firmware version was older than 3.5.0.
Current firmware includes the BMP280 pin mapping in the WAVESHARE_LITE
hardware profile. Replace 192.168.178.235 with your GATAS device’s IP address
and check the saved hardware configuration:
curl "http://192.168.178.235/api/Config/WAVESHARE_LITE.json"
The response should contain this entry:
"Bmp280": {
"cs": 21,
"dev": 0
}
If the entry is missing, add it with the following command:
curl --header "Content-Type: application/json" \
--request POST \
--data '{
"cs": 21,
"dev": 0
}' \
"http://192.168.178.235/api/Config/WAVESHARE_LITE/Bmp280.json"
Enable and calibrate the module
- Open the GATAS web interface at the device’s IP address.
- Open Modules.
- Enable Bmp280.
- Save the module configuration and restart the device if requested.
- Open the Bmp280 monitor and confirm that it reports a pressure value.
- If necessary, compare the reading with a reliable local pressure reference
and set Compensation in the Bmp280 configuration. Compensation is in
pascals, so
100adds 1 hPa and-100subtracts 1 hPa.
Troubleshooting
- Confirm that the IP address in each
curlcommand is your GATAS device’s current address. - Check that the
WAVESHARE_LITEconfiguration contains theBmp280entry shown above. - Make sure CS is connected to GPIO21 (physical pin 27), not physical pin 21.
- Confirm that the module is enabled and that the device was restarted if the web interface requested it.