Skip to content

Commit 77d4774

Browse files
committed
updated examples to use the new core changes -- not validated yet
1 parent d62988b commit 77d4774

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

examples/Example_01_BasicReadings/Example_01_BasicReadings.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
#include "SparkFun_BMV080_Arduino_Library.h" // CTRL+Click here to get the library: http://librarymanager/All#SparkFun_BMV080
2828
#include <Wire.h>
2929

30-
SparkFunBMV080I2C bmv080; // Create an instance of the BMV080 class
31-
#define BMV080_ADDR 0x57 // SparkFun BMV080 Breakout defaults to 0x57
30+
SparkFunBMV080I2C bmv080; // Create an instance of the BMV080 class
31+
#define BMV080_ADDR 0x57 // SparkFun BMV080 Breakout defaults to 0x57
3232

3333
// Some Dev boards have their QWIIC connector on Wire or Wire1
3434
// This #ifdef will help this sketch work across more products
3535

3636
#ifdef ARDUINO_SPARKFUN_THINGPLUS_RP2040
37-
#define wirePort Wire1
37+
#define wirePort Wire1
3838
#else
39-
#define wirePort Wire
39+
#define wirePort Wire
4040
#endif
4141

4242
void setup()
@@ -81,7 +81,7 @@ void setup()
8181

8282
void loop()
8383
{
84-
if (bmv080.isDataAvailable())
84+
if (bmv080.readSensor())
8585
{
8686
float pm25 = bmv080.PM25();
8787
float pm1 = bmv080.PM1();

examples/Example_02_DutyCycle/Example_02_DutyCycle.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void setup()
8989

9090
void loop()
9191
{
92-
if(bmv080.isDataAvailable())
92+
if(bmv080.readSensor())
9393
{
9494
float pm25 = bmv080.PM25();
9595

examples/Example_03_Interrupt/Example_03_Interrupt.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void loop()
9595
int_flag = false; // Reset the flag
9696
do{
9797
Serial.println("Reading BMV080");
98-
if(bmv080.isDataAvailable())
98+
if(bmv080.readSensor())
9999
{
100100
float pm25 = bmv080.PM25();
101101
Serial.print(pm25);

examples/Example_04_SPI/Example_04_SPI.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void setup()
8080

8181
void loop()
8282
{
83-
if(bmv080.isDataAvailable())
83+
if(bmv080.readSensor())
8484
{
8585
float pm25 = bmv080.PM25();
8686

examples/Example_05_Parameters/Example_05_Parameters.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void setup()
9191

9292
void loop()
9393
{
94-
if(bmv080.isDataAvailable())
94+
if(bmv080.readSensor())
9595
{
9696
float pm25 = bmv080.PM25();
9797

examples/Example_06_TwoSensors/Example_06_TwoSensors.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void setup()
121121

122122
void loop()
123123
{
124-
if (bmv080.isDataAvailable())
124+
if (bmv080.readSensor())
125125
{
126126
pm25 = bmv080.PM25();
127127
isObstructed = bmv080.isObstructed();
@@ -130,7 +130,7 @@ void loop()
130130
}
131131
delay(200); // needs a ~200ms delay in between talking to each sensor
132132

133-
if (bmv080_2.isDataAvailable())
133+
if (bmv080_2.readSensor())
134134
{
135135
pm25_2 = bmv080_2.PM25();
136136
isObstructed2 = bmv080_2.isObstructed();

examples/Example_07_Demo_Alphanumeric/Example_07_Demo_Alphanumeric.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void setup()
100100

101101
void loop()
102102
{
103-
if (bmv080.isDataAvailable())
103+
if (bmv080.readSensor())
104104
{
105105
float pm25 = bmv080.PM25();
106106

examples/Example_08_Demo_Oled/Example_08_Demo_Oled.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ void setup()
182182

183183
void loop()
184184
{
185-
if (bmv080.isDataAvailable())
185+
if (bmv080.readSensor())
186186
{
187187
pm25Value = bmv080.PM25();
188188
pm1Value = bmv080.PM1();

0 commit comments

Comments
 (0)