We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50bfe62 commit 3d75699Copy full SHA for 3d75699
src/vl53l1x_class.cpp
@@ -173,6 +173,9 @@ VL53L1X_ERROR VL53L1X::VL53L1X_SensorInit()
173
status = VL53L1_WrByte(Device, Addr, VL51L1X_DEFAULT_CONFIGURATION[Addr - 0x2D]);
174
}
175
status = VL53L1X_StartRanging();
176
+
177
+ delay(103); //Wait the default intermeasurement period of 103ms before checking for dataready
178
179
while (tmp == 0)
180
{
181
status = VL53L1X_CheckForDataReady(&tmp);
@@ -182,6 +185,7 @@ VL53L1X_ERROR VL53L1X::VL53L1X_SensorInit()
182
185
status = VL53L1_ERROR_TIME_OUT;
183
186
return status;
184
187
188
+ delay(1);
189
190
tmp = 0;
191
status = VL53L1X_ClearInterrupt();
0 commit comments