Skip to content

Commit c719a4b

Browse files
Examples are functional
Made update to begin() function call in the examples; all examples now work
1 parent 377a424 commit c719a4b

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

examples/Example2_Interrupts/Example2_Interrupts.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ STHS34PF80_I2C mySensor;
5454
int16_t presenceVal = 0;
5555

5656
// Change the pin number to the pin that has been chosen for your setup
57-
int intPin = 14;
57+
int intPin = 2;
5858

5959
// Star the flag as false
6060
bool volatile interruptFlag = false;
@@ -78,7 +78,7 @@ void setup()
7878
}
7979

8080
// Establish communication with device
81-
if(mySensor.begin() != 0)
81+
if(mySensor.begin() == false)
8282
{
8383
Serial.println("Error setting up device - please check wiring.");
8484
while(1);

examples/Example3_EmbeddedFunctions/Example3_EmbeddedFunctions.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void setup()
6969
}
7070

7171
// Establish communication with device
72-
if(mySensor.begin() != 0)
72+
if(mySensor.begin() == false)
7373
{
7474
Serial.println("Error setting up device - please check wiring.");
7575
while(1);

examples/Example4_SPIFunctionality/Example4_SPIFunctionality.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void setup()
7171
SPI.begin();
7272

7373
// Establish communication with device
74-
if(mySensor.begin(chipSelect) != 0)
74+
if(mySensor.begin(chipSelect) == false)
7575
{
7676
Serial.println("Error setting up device - please check wiring.");
7777
while(1);

examples/Example5_ArduinoPlotterOutput/Example5_ArduinoPlotterOutput.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void setup()
6565
}
6666

6767
// Establish communication with device
68-
if(mySensor.begin() != 0)
68+
if(mySensor.begin() == false)
6969
{
7070
Serial.println("Error setting up device - please check wiring.");
7171
while(1);

src/sfe_bus.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// SparkFun Human Presence Sensor STHS34PF80 (Qwiic)
1111
// https://www.sparkfun.com/products/22494
1212
//
13-
// Written by Madison Chodikov @ SparkFun Electronics, October 2022
13+
// Written by Madison Chodikov @ SparkFun Electronics, October 2023
1414
//
1515
// Repository:
1616
// https://github.com/sparkfun/SparkFun_STHS34PF80_Arduino_Library/tree/main

src/sfe_bus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// SparkFun Human Presence Sensor STHS34PF80 (Qwiic)
1111
// https://www.sparkfun.com/products/22494
1212
//
13-
// Written by Madison Chodikov @ SparkFun Electronics, October 2022
13+
// Written by Madison Chodikov @ SparkFun Electronics, October 2023
1414
//
1515
// Repository:
1616
// hhttps://github.com/sparkfun/SparkFun_STHS34PF80_Arduino_Library/tree/main

0 commit comments

Comments
 (0)