Skip to content

Commit d51cb51

Browse files
committed
small corrections in examples
-Example SPI - IoT Redboard ESP32 uses pin number 5 for it's CS -Opening print statement correction for example 6 -added other pm sizes to example 5
1 parent 75149a7 commit d51cb51

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

examples/Example_04_SPI/Example_04_SPI.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include "SparkFun_BMV080_Arduino_Library.h" // CTRL+Click here to get the library: http://librarymanager/All#SparkFun_BMV080
3737

3838
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
4040

4141
void setup()
4242
{

examples/Example_05_Parameters/Example_05_Parameters.ino

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,20 @@ void loop()
9393
{
9494
if(bmv080.readSensor())
9595
{
96+
float pm10 = bmv080.PM10();
9697
float pm25 = bmv080.PM25();
98+
float pm1 = bmv080.PM1();
9799

100+
Serial.print("PM10: ");
101+
Serial.print(pm10);
102+
Serial.print("\t");
103+
Serial.print("PM2.5: ");
98104
Serial.print(pm25);
105+
Serial.print("\t");
106+
Serial.print("PM1: ");
107+
Serial.print(pm1);
99108

100-
if(bmv080.isObstructed() == true)
109+
if (bmv080.isObstructed() == true)
101110
{
102111
Serial.print("\tObstructed");
103112
}

examples/Example_06_TwoSensors/Example_06_TwoSensors.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void setup()
6868
// Comment out this while loop, or it will prevent the remaining code from running.
6969

7070
Serial.println();
71-
Serial.println("BMV080 Example 1 - Basic Readings");
71+
Serial.println("BMV080 Example 6 - Two Sensors");
7272

7373
wirePort.begin();
7474

0 commit comments

Comments
 (0)