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 pinPico GPIOPico physical pin
3V3 / VCC—36
GNDGround38 (or another GND pin)
CS / CSBGPIO2127
SCK / SCLGPIO1014
MOSI / SDI / SDAGPIO1115
MISO / SDOGPIO1216

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 curl commands 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

  1. Open the GATAS web interface at the device’s IP address.
  2. Open Modules.
  3. Enable Bmp280.
  4. Save the module configuration and restart the device if requested.
  5. Open the Bmp280 monitor and confirm that it reports a pressure value.
  6. If necessary, compare the reading with a reliable local pressure reference and set Compensation in the Bmp280 configuration. Compensation is in pascals, so 100 adds 1 hPa and -100 subtracts 1 hPa.

Troubleshooting

  • Confirm that the IP address in each curl command is your GATAS device’s current address.
  • Check that the WAVESHARE_LITE configuration contains the Bmp280 entry 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.