sparkfun / SparkFun_VL53L1X_Arduino_Library

A library for the laser based VL53L1X Time Of Flight distance sensor capable of detecting a target 4m away!
MIT License
88 stars 50 forks source link

Example3_StatusAndRate has status values 1 & 2 reversed #30

Closed ShakeThat closed 4 years ago

ShakeThat commented 4 years ago

Example3_StatusAndRate.ino:

  switch (rangeStatus)
  {
    case 0:
      Serial.print("Good");
      break;
    case 1:
      Serial.print("Signal fail");
      break;
    case 2:
      Serial.print("Sigma fail");
      break;
    case 7:
      Serial.print("Wrapped target fail");
      break;
    default:
      Serial.print("Unknown: ");
      Serial.print(rangeStatus);
      break;
  }

ST Software Guide:

When the range status is 1, there is a sigma failure. This means that the repeatability or standard deviation of the measurement is bad due to a decreasing signal noise ratio. Increasing the timing budget can improve the standard deviation and avoid a range status 1. When the range status is 2, there is a signal failure. This means that the return signal is too week to return a good answer. The reason is because the target is too far, or the target is not reflective enough, or the target is too small. Increasing the timing buget might help, but there may simply be no target available.

santaimpersonator commented 4 years ago

Great catch. Updated in latest commit.