File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 36
36
#include " SparkFun_BMV080_Arduino_Library.h" // CTRL+Click here to get the library: http://librarymanager/All#SparkFun_BMV080
37
37
38
38
SparkFunBMV080SPI bmv080; // Create an instance of the BMV080 class
39
- #define CS_PIN 15 // Define the chip select pin
39
+ #define CS_PIN 5 // Define the chip select pin
40
40
41
41
void setup ()
42
42
{
Original file line number Diff line number Diff line change @@ -93,11 +93,20 @@ void loop()
93
93
{
94
94
if (bmv080.readSensor ())
95
95
{
96
+ float pm10 = bmv080.PM10 ();
96
97
float pm25 = bmv080.PM25 ();
98
+ float pm1 = bmv080.PM1 ();
97
99
100
+ Serial.print (" PM10: " );
101
+ Serial.print (pm10);
102
+ Serial.print (" \t " );
103
+ Serial.print (" PM2.5: " );
98
104
Serial.print (pm25);
105
+ Serial.print (" \t " );
106
+ Serial.print (" PM1: " );
107
+ Serial.print (pm1);
99
108
100
- if (bmv080.isObstructed () == true )
109
+ if (bmv080.isObstructed () == true )
101
110
{
102
111
Serial.print (" \t Obstructed" );
103
112
}
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ void setup()
68
68
// Comment out this while loop, or it will prevent the remaining code from running.
69
69
70
70
Serial.println ();
71
- Serial.println (" BMV080 Example 1 - Basic Readings " );
71
+ Serial.println (" BMV080 Example 6 - Two Sensors " );
72
72
73
73
wirePort.begin ();
74
74
You can’t perform that action at this time.
0 commit comments