Enable BME280 sensor — pressure, temperature, humidity #30

Closed
opened 2026-02-28 19:33:11 -05:00 by seb · 0 comments
Owner

Hardware

A BME280 (GYBMEP breakout) is already connected to the MAMBA F722S on I2C1 (PB8/PB9).

Spec: https://www.robotics.org.za/BME280-5V

BME280 Quick Specs

  • Pressure: 300–1100 hPa (±0.12 hPa relative = ±1m altitude accuracy)
  • Temperature: -40 to +85°C (±1.0°C)
  • Humidity: 0–100% RH (±3% RH)
  • I2C address: 0x76 (SDO LOW) or 0x77 (SDO HIGH)
  • Chip ID: 0x60 (BME280) vs 0x58 (BMP280 — no humidity)
  • Power: 3.6μA @ 1Hz, 0.1μA sleep
  • Breakout has onboard 3.3V LDO + level shifters — safe with 5V supply

Current State

PR #27 added bmp280.c with auto-detect for BMP280/BME280 (probes 0x76 then 0x77). However:

  • Previous attempts had I2C init hanging (noted in MEMORY.md)
  • Need to verify the I2C hang is resolved with the new i2c1.c shared bus init
  • BME280 humidity readout may not be implemented yet (BMP280 driver only reads pressure + temp)

Required

  1. Confirm I2C1 init works without hanging (test on hardware)
  2. Add humidity readout for BME280 (register 0xFD-0xFE, with compensation)
  3. Add t (temp °C ×10), h (humidity %RH ×10), pa (pressure hPa ×10) to JSON telemetry
  4. Update web UI to display temperature, humidity, pressure
  5. Useful for: altitude estimation, weather awareness, indoor/outdoor detection, motor thermal monitoring (ambient baseline)
## Hardware A **BME280** (GYBMEP breakout) is already connected to the MAMBA F722S on **I2C1 (PB8/PB9)**. Spec: https://www.robotics.org.za/BME280-5V ### BME280 Quick Specs - **Pressure:** 300–1100 hPa (±0.12 hPa relative = ±1m altitude accuracy) - **Temperature:** -40 to +85°C (±1.0°C) - **Humidity:** 0–100% RH (±3% RH) - **I2C address:** 0x76 (SDO LOW) or 0x77 (SDO HIGH) - **Chip ID:** 0x60 (BME280) vs 0x58 (BMP280 — no humidity) - **Power:** 3.6μA @ 1Hz, 0.1μA sleep - **Breakout has onboard 3.3V LDO + level shifters** — safe with 5V supply ## Current State PR #27 added `bmp280.c` with auto-detect for BMP280/BME280 (probes 0x76 then 0x77). However: - Previous attempts had **I2C init hanging** (noted in MEMORY.md) - Need to verify the I2C hang is resolved with the new `i2c1.c` shared bus init - BME280 humidity readout may not be implemented yet (BMP280 driver only reads pressure + temp) ## Required 1. Confirm I2C1 init works without hanging (test on hardware) 2. Add humidity readout for BME280 (register 0xFD-0xFE, with compensation) 3. Add `t` (temp °C ×10), `h` (humidity %RH ×10), `pa` (pressure hPa ×10) to JSON telemetry 4. Update web UI to display temperature, humidity, pressure 5. Useful for: altitude estimation, weather awareness, indoor/outdoor detection, motor thermal monitoring (ambient baseline)
seb closed this issue 2026-02-28 21:42:56 -05:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#30
No description provided.