Read pressure and sensor temperature from a BMP388 or BMP390 over I2C. More...
Public Member Functions | |
| None | __init__ (self, int address=DEFAULT_ADDRESS, Any|None i2c=None) |
| Create a BMP3XX sensor. | |
| bool | is_started (self) |
| Return whether the sensor has been initialized. | |
| int | address (self) |
| Return the configured I2C address. | |
| None | start (self) |
| Initialize the I2C bus and BMP3XX sensor. | |
| None | stop (self) |
| Release resources owned by the sensor. | |
| float | get_pressure_pa (self) |
| Return atmospheric pressure in pascals. | |
| float | get_temperature_c (self) |
| Return sensor temperature in degrees Celsius. | |
Read pressure and sensor temperature from a BMP388 or BMP390 over I2C.
Adafruit's BMP3XX driver detects and supports both sensor variants. The underlying driver reports pressure in hectopascals; this implementation converts it to pascals before exposing it through the hardware interface.
| None hardware_io.environmental.bmp3xx.Bmp3xx.__init__ | ( | self, | |
| int | address = DEFAULT_ADDRESS, |
||
| Any | None | i2c = None |
||
| ) |
Create a BMP3XX sensor.
Args: address: I2C address of the sensor. i2c: Optional pre-created CircuitPython-compatible I2C bus. When omitted, the Raspberry Pi's default I2C bus is used.