The hardware_io.environmental package provides hardware interfaces and concrete implementations for environmental sensors such as barometric pressure sensors.
The goal of this package is to expose raw environmental measurements from physical devices while remaining independent of any application, user interface, or higher-level processing. Environmental calculations such as weather prediction, altitude estimation, sensor fusion, or trend analysis belong in higher-level controllers.
| Device | Interface | Measurements |
|---|---|---|
| BMP388 | I²C | Atmospheric pressure, temperature |
| BMP390 | I²C | Atmospheric pressure, temperature |
Future implementations may include:
Bmp3xx contains the shared BMP388/BMP390 implementation. Bmp388 and Bmp390 remain available as compatibility names for existing configuration and imports.
This module is responsible for:
This module is not responsible for:
Those responsibilities belong to higher-level controllers.
The hardware interfaces expose measurements using SI units.
| Measurement | Unit |
|---|---|
| Pressure | Pascals (Pa) |
| Temperature | Degrees Celsius (°C) |
Returning consistent units allows higher-level software to perform calculations without needing device-specific conversions.
The BMP388 and BMP390 implementations use Adafruit's CircuitPython driver.
The project installer can install the same system and Python dependencies. Choose exactly one driver:
or:
The interactive host_setup_tui.sh installer provides the same choice under Environmental sensors.
Connect the BMP388 or BMP390 breakout to the Raspberry Pi I²C bus:
| Sensor | Raspberry Pi |
|---|---|
| VIN/VCC | 3.3 V |
| GND | Ground |
| SCL | I²C SCL |
| SDA | I²C SDA |
Check the voltage requirements of the specific breakout board before wiring it. Enable I²C through sudo raspi-config, then verify that the sensor is visible:
The default address is 0x77. A board configured with SDO low commonly appears at 0x76.
Run the live BMP388 hardware test from the project root:
The CLI reports pressure in pascals and temperature in degrees Celsius once per second. Press Ctrl+C to stop it.
Read one sample and exit:
Display pressure in inches of mercury and temperature in Fahrenheit:
Use address 0x76 or change the sampling interval:
The same component test can exercise a BMP390:
Run the CLI with --help to see all options.
This package is intended to grow as additional environmental sensors are supported.
Potential future capabilities include:
The public interfaces should remain stable while allowing additional hardware implementations to be added without affecting client applications.