Zum Inhalt springen

WSAL15231 – BME280 Environmental Sensor/en

Aus JW Tech Wiki

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

Compact environmental sensor by Waveshare with a BME280 chip. Measures temperature, humidity and barometric pressure over I2C or SPI; compatible with 3.3 V/5 V.

Related products at JW Tech

Technical overview

  • The BME280 measures temperature from -40 to 85 °C (resolution 0.01 °C, accuracy ±1 °C), humidity from 0–100 %RH (resolution 0.008 %RH, accuracy ±3 %RH), and barometric pressure from 300–1100 hPa (resolution 0.18 Pa, accuracy ±1 hPa).
  • The module is 27 mm × 20 mm with a 2.0 mm mounting hole.
  • Default I2C address is 0x77; grounding the ADDR pin switches it to 0x76.
  • Using SPI requires changing the USEIIC macro definition to 0 in the Raspberry Pi, Arduino, and STM32 examples.
  • For Raspberry Pi: enable the I2C and SPI drivers via raspi-config, then verify the address with i2cdetect -y 1.
  • For Arduino: install the library into the third-party folder, open the bme280test example, and check serial output at 115200 baud.
  • For STM32: open the project file, wire according to the interface description, compile, and output via USART2 at 115200 baud.
  • The demo uses the official Bosch BME280_driver library; platform-specific read/write and delay functions must be implemented.

Commands and examples – verify before use: 

sudo raspi-config
lsmod
sudo apt-get install i2c-tools
i2cdetect -y 1
sudo make clean
sudo make
sudo ./bme280

Notes and version constraints

  • Barometer altitude calculations only provide relative values over short periods; for long-term absolute altitude measurement, add GPS.
  • If data display is abnormal: check connection, communication mode, and device address.
  • The source contains placeholders and incomplete code sections; all steps should be confirmed by a technician before use in a product context.

Source and revision record