File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
examples/Example_01_BasicReadings Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -83,11 +83,17 @@ void loop()
83
83
{
84
84
if (bmv080.readSensor ())
85
85
{
86
+ float pm10 = bmv080.PM10 ();
86
87
float pm25 = bmv080.PM25 ();
87
88
float pm1 = bmv080.PM1 ();
88
89
90
+ Serial.print (" PM10: " );
91
+ Serial.print (pm10);
92
+ Serial.print (" \t " );
93
+ Serial.print (" PM2.5: " );
89
94
Serial.print (pm25);
90
95
Serial.print (" \t " );
96
+ Serial.print (" PM1: " );
91
97
Serial.print (pm1);
92
98
93
99
if (bmv080.isObstructed () == true )
Original file line number Diff line number Diff line change @@ -133,6 +133,12 @@ sfTkError_t sfDevBMV080::begin(sfTkIBus *theBus)
133
133
return ksfTkErrOk;
134
134
}
135
135
136
+ // ---------------------------------------------------------------------
137
+ float sfDevBMV080::PM10 ()
138
+ {
139
+ return _sensorValue.pm10_mass_concentration ;
140
+ }
141
+
136
142
// ---------------------------------------------------------------------
137
143
float sfDevBMV080::PM25 ()
138
144
{
Original file line number Diff line number Diff line change @@ -183,6 +183,23 @@ class sfDevBMV080
183
183
*/
184
184
bool setMode (uint8_t mode);
185
185
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
+
186
203
/* *
187
204
* @brief Gets the PM2.5 (particulate matter ≤2.5 µm) concentration
188
205
*
You can’t perform that action at this time.
0 commit comments