bmp3xx SPI support added (#3801)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Anton Viktorov 2024-05-02 03:49:06 +02:00 committed by GitHub
parent 74686fadb2
commit 4217ab9c30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,8 +7,8 @@ BMP388 / BMP390 Temperature+Pressure Sensor
:keywords: BMP388 BMP390
The ``bmp3xx`` sensor platform allows you to use your BMP388 or BMP390
(`datasheet <https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp390-ds002.pdf>`__, `BMP390 product page <https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp390/>`__) temperature and pressure sensors with ESPHome. The :ref:`I²C <i2c>` bus is
required to be set up in your configuration for this sensor to work.
(`datasheet <https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp390-ds002.pdf>`__, `BMP390 product page <https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp390/>`__) temperature and pressure sensors with ESPHome.
Either :ref:`I²C <i2c>` bus or :ref:`SPI <spi>` bus is required to be set up in your configuration for this sensor to work.
.. figure:: images/bmp388.jpg
:align: center
@ -16,11 +16,16 @@ required to be set up in your configuration for this sensor to work.
BMP388/BMP390 Temperature and Pressure Sensor.
Over I²C
--------
The ``bmp3xx_i2c`` component allows you to use the device over :ref:`I²C <i2c>` interface.
.. code-block:: yaml
# Example configuration entry
# Example configuration entry for I2C connection
sensor:
- platform: bmp3xx
- platform: bmp3xx_i2c
temperature:
name: "Outside Temperature"
oversampling: 16x
@ -29,34 +34,72 @@ required to be set up in your configuration for this sensor to work.
address: 0x77
update_interval: 60s
Configuration variables:
------------------------
Configuration variables:
************************
- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x77``.
Another address can be ``0x76``.
- **temperature** (*Optional*): The information for the temperature sensor.
- **name** (**Required**, string): The name for the temperature
sensor.
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
See :ref:`Oversampling Options <bmp3xx-oversampling>`.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **pressure** (*Optional*): The information for the pressure sensor.
- **name** (**Required**, string): The name for the pressure sensor.
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
See :ref:`Oversampling Options <bmp3xx-oversampling>`.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **address** (*Optional*, int): Manually specify the I²C address of
the sensor. Defaults to ``0x77``. Another address can be ``0x76``.
- **iir_filter** (*Optional*): Set up an Infinite Impulse Response filter to increase accuracy. One of
``OFF``, ``2x``, ``4x``, ``16x``, ``32``, ``64x``, ``128x``. Defaults to ``OFF``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
Over SPI
--------
The ``bmp3xx_spi`` component allows you to use the device over :ref:`SPI <spi>` interface.
.. code-block:: yaml
# Example configuration entry for SPI connection
sensor:
- platform: bmp3xx_spi
temperature:
name: "Outside Temperature"
oversampling: 16x
pressure:
name: "Outside Pressure"
cs_pin: 13
update_interval: 60s
Configuration variables:
************************
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The Chip Select (CS) pin.
- **temperature** (*Optional*): The information for the temperature sensor.
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
See :ref:`Oversampling Options <bmp3xx-oversampling>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **pressure** (*Optional*): The information for the pressure sensor.
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
See :ref:`Oversampling Options <bmp3xx-oversampling>`.
- All other options from :ref:`Sensor <config-sensor>`.
- **iir_filter** (*Optional*): Set up an Infinite Impulse Response filter to increase accuracy. One of
``OFF``, ``2x``, ``4x``, ``16x``, ``32``, ``64x``, ``128x``. Defaults to ``OFF``.
- **address** (*Optional*, int): *I2C* only. Manually specify the I²C address of
the sensor. Defaults to ``0x77``. Another address can be ``0x76``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
.. _bmp3xx-oversampling:
Oversampling Options
@ -80,7 +123,7 @@ See Also
- :doc:`bmp280`
- :doc:`bme680`
- :doc:`bmp085`
- :apiref:`bmp3xx/bmp3xx.h`
- :apiref:`bmp3xx_base/bmp3xx_base.h`
- `BMP3 sensor API <https://github.com/BoschSensortec/BMP3-Sensor-API>`__
- `BMP388/BMP390 Library <https://github.com/MartinL1/BMP388_DEV>`__ by Martin Lindupp
- :ghedit:`Edit`

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB