Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
to continue on errors during sensor clean
  • Loading branch information
LeonieFierz committed Jan 30, 2025
1 parent ff43a29 commit 493c467
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions examples/exampleScd41SingleShot/exampleScd41SingleShot.ino
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,18 @@ void setup() {
Serial.print("Error trying to execute wakeUp(): ");
errorToString(error, errorMessage, sizeof errorMessage);
Serial.println(errorMessage);
return;
}
error = sensor.stopPeriodicMeasurement();
if (error != NO_ERROR) {
Serial.print("Error trying to execute stopPeriodicMeasurement(): ");
errorToString(error, errorMessage, sizeof errorMessage);
Serial.println(errorMessage);
return;
}
error = sensor.reinit();
if (error != NO_ERROR) {
Serial.print("Error trying to execute reinit(): ");
errorToString(error, errorMessage, sizeof errorMessage);
Serial.println(errorMessage);
return;
}
// Read out information about the sensor
error = sensor.getSerialNumber(serialNumber, 3);
Expand Down
3 changes: 0 additions & 3 deletions examples/exampleUsage/exampleUsage.ino
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,18 @@ void setup() {
Serial.print("Error trying to execute wakeUp(): ");
errorToString(error, errorMessage, sizeof errorMessage);
Serial.println(errorMessage);
return;
}
error = sensor.stopPeriodicMeasurement();
if (error != NO_ERROR) {
Serial.print("Error trying to execute stopPeriodicMeasurement(): ");
errorToString(error, errorMessage, sizeof errorMessage);
Serial.println(errorMessage);
return;
}
error = sensor.reinit();
if (error != NO_ERROR) {
Serial.print("Error trying to execute reinit(): ");
errorToString(error, errorMessage, sizeof errorMessage);
Serial.println(errorMessage);
return;
}
// Read out information about the sensor
error = sensor.getSerialNumber(serialNumber, 3);
Expand Down

0 comments on commit 493c467

Please sign in to comment.