Skip to content

Commit 75149a7

Browse files
committed
adds PM10
1 parent 9316c17 commit 75149a7

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

examples/Example_01_BasicReadings/Example_01_BasicReadings.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,17 @@ void loop()
8383
{
8484
if (bmv080.readSensor())
8585
{
86+
float pm10 = bmv080.PM10();
8687
float pm25 = bmv080.PM25();
8788
float pm1 = bmv080.PM1();
8889

90+
Serial.print("PM10: ");
91+
Serial.print(pm10);
92+
Serial.print("\t");
93+
Serial.print("PM2.5: ");
8994
Serial.print(pm25);
9095
Serial.print("\t");
96+
Serial.print("PM1: ");
9197
Serial.print(pm1);
9298

9399
if (bmv080.isObstructed() == true)

src/sfTk/sfDevBMV080.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ sfTkError_t sfDevBMV080::begin(sfTkIBus *theBus)
133133
return ksfTkErrOk;
134134
}
135135

136+
//---------------------------------------------------------------------
137+
float sfDevBMV080::PM10()
138+
{
139+
return _sensorValue.pm10_mass_concentration;
140+
}
141+
136142
//---------------------------------------------------------------------
137143
float sfDevBMV080::PM25()
138144
{

src/sfTk/sfDevBMV080.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,23 @@ class sfDevBMV080
183183
*/
184184
bool setMode(uint8_t mode);
185185

186+
/**
187+
* @brief Gets the PM10 (particulate matter ≤10 µm) concentration
188+
*
189+
* This method returns the latest PM10 reading from the sensor's internal cache.
190+
* The value represents the mass concentration of particles with a diameter
191+
* of 10 micrometers or less.
192+
*
193+
* @return The PM10 concentration in micrograms per cubic meter (µg/m³)
194+
*
195+
* @note The PM10 value is updated when readSensor() is called
196+
*
197+
* @see readSensor()
198+
* @see PM1()
199+
* @see bmv080_output_t
200+
*/
201+
float PM10(void);
202+
186203
/**
187204
* @brief Gets the PM2.5 (particulate matter ≤2.5 µm) concentration
188205
*

0 commit comments

Comments
 (0)