File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
examples/Example1_ReadDistance Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 1+ #include < ComponentObject.h>
2+ #include < RangeSensor.h>
3+ #include < SparkFun_VL53L1X.h>
4+ #include < vl53l1x_class.h>
5+ #include < vl53l1_error_codes.h>
6+
17/*
28 Reading distance from the laser based VL53L1X
39 By: Nathan Seidle
@@ -32,8 +38,9 @@ void setup(void)
3238 Serial.println (" VL53L1X Qwiic Test" );
3339
3440 if (distanceSensor.begin () == false )
41+ {
3542 Serial.println (" Sensor online!" );
36-
43+ }
3744}
3845
3946void loop (void )
Original file line number Diff line number Diff line change 11name =SparkFun VL53L1X 4m Laser Distance Sensor
2- version =1.1.2
2+ version =1.1.3
33author =SparkFun Electronics <techsupport@sparkfun.com>
44maintainer =SparkFun Electronics <sparkfun.com>
55sentence =Library for the SparkFun Qwiic 4m Distance Sensor - VL53L1X
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ void SFEVL53L1X::setOffset(int16_t offset)
230230
231231int16_t SFEVL53L1X::getOffset ()
232232{
233- uint16_t temp;
233+ int16_t temp;
234234 _device->VL53L1X_GetOffset (&temp);
235235 return temp;
236236}
@@ -326,11 +326,11 @@ void SFEVL53L1X::startTemperatureUpdate()
326326void SFEVL53L1X::calibrateOffset (uint16_t targetDistanceInMm)
327327{
328328 int16_t offset = getOffset ();
329- _device->VL53L1X_CalibrateOffset (targetDistanceInMm, offset);
329+ _device->VL53L1X_CalibrateOffset (targetDistanceInMm, & offset);
330330}
331331
332332void SFEVL53L1X::calibrateXTalk (uint16_t targetDistanceInMm)
333333{
334- int16_t xTalk = getXTalk ();
335- _device->VL53L1X_CalibrateXtalk (targetDistanceInMm, xTalk);
334+ uint16_t xTalk = getXTalk ();
335+ _device->VL53L1X_CalibrateXtalk (targetDistanceInMm, & xTalk);
336336};
You can’t perform that action at this time.
0 commit comments