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.
Example3_StatusAndRate.ino:
ST Software Guide: