Arduino library for the Bosch Sensortec BMV080 particulate matter sensor
(PM1, PM2.5, PM10).
This library is a 7Semi wrapper around the official Bosch BMV080 SDK and supports both I2C and SPI interfaces.
- Supports I2C and SPI
- Continuous measurement mode
- PM1 / PM2.5 / PM10 output
- Obstruction and range status flags
- Designed for Arduino
Bosch does not provide the BMV080 driver as open-source.
You must download the Bosch BMV080 SDK and copy required files into this library, otherwise compilation will fail.
Required Bosch files:
bmv080.hbmv080_defs.hlib_bmv080.alib_postProcessor.a
| BMV080 Pin | Connect To (MCU) |
|---|---|
| VCC | 3.3V (or as per module spec) |
| GND | GND |
| SDA | I2C SDA |
| SCL | I2C SCL |
| BMV080 Pin | Connect To (MCU) |
|---|---|
| VCC | 3.3V (or as per module spec) |
| GND | GND |
| SCK (SCL) | SPI SCK |
| MISO(SDA) | SPI MISO |
| MOSI(SDO) | SPI MOSI |
| CS | Any GPIO (Chip Select) |
Initialize the sensor using begin()
Start measurements using startContinuous()
Call getSensorData() repeatedly in loop()
Read PM values from the output structure
#include <7Semi_BMV080.h>
BMV080_7Semi bmv;
bmv080_output_t data;
void setup()
{
Serial.begin(115200);
// Initialize BMV080 over I2C (default Wire, default address)
if (!bmv.begin(Wire)) {
while (1); // Initialization failed
}
// Start continuous measurement
bmv.startContinuous();
}
void loop()
{
// Read data when a new sample is available
if (bmv.getSensorData(data))
{
Serial.println(data.pm2_5_mass_concentration);
}
}bmv080.h not found
Bosch headers not copied correctly
Include path missing
undefined reference to bmv080_*
Bosch .a files not linked
Wrong library selected for your MCU or toolchain
7Semi wrapper code: MIT (or your chosen license)
Bosch SDK files: Bosch Sensortec license