BME280 Sensor Sample Tweaks (samples-sensor-bme280-tweaks)
west build -S samples-sensor-bme280-tweaks [...]
Overview
Unfortunately, the example for the BME280 humidity and pressure sensor from the Zephyr
upstream repository binds such a sensor hard to the SPI bus regardless of board
and shield variations, although the Raspberry Pi Pico board has no such
sensor available. Thus, no matter what you try to change via shields, a BME280
sensor is always defined and activated on the SPI bus as soon as the board name
is set to rpi_pico
.
This tweak snippet now always deletes such an entry and should only be used exclusively for the standard BME280 humidity and pressure sensor sample from Zephyr.
Board specific setups
Only selected boards are supported by this snippet. There is no basic configuration.
Supported boards are:
Raspberry Pi Pico
west build -b rpi_pico -p -S usb-console -S samples-sensor-bme280-tweaks -d build/rpi_pico zephyr/samples/sensor/bme280
west flash -r uf2 -d build/rpi_pico
1&spi0 {
2 /delete-property/ cs-gpios;
3 /delete-node/ bme280@0;
4};
How to add support of a new board
add board devicetree overlay to this snippet;
which add the needed tweaks