A demonstration program to show the use of a VL53L3CX ToF sensor on a F401 board with a x-nucleo shield. Uses Ranging library. Mbed 6.
Diff: main.cpp
- Revision:
- 3:35a4659d0ae4
- Parent:
- 2:0ea3b4cbcfd1
diff -r 0ea3b4cbcfd1 -r 35a4659d0ae4 main.cpp --- a/main.cpp Wed Jul 21 09:33:43 2021 +0000 +++ b/main.cpp Wed Jul 21 10:22:17 2021 +0000 @@ -122,7 +122,7 @@ { for ( target = 0 ; target < Result.ZoneResult[0].NumberOfTargets; target++) { - if (Result.ZoneResult[zone].Status[0] == VL53LX_RANGESTATUS_RANGE_VALID ) + if (Result.ZoneResult[zone].Status[target] == VL53LX_RANGESTATUS_RANGE_VALID ) { printf("\n |---> "); printf("Status = %d, Target %d, Distance = %5d mm",