While running the min/max example for the VL53L8cx sensor I noticed what it was giving me negative/positive ranges for the min value when the camera is in the vertical position
===================
Min depth in mm seen: -450.00
Max depth in mm seen: 3213.00
73.82926
Min depth in mm seen: -440.00
Max depth in mm seen: 4585.00
73.8321
Min depth in mm seen: -430.00
Max depth in mm seen: 3221.00
73.8349
Min depth in mm seen: 244.00
Max depth in mm seen: 4483.00
73.8481
Min depth in mm seen: -426.00
Max depth in mm seen: 3555.00
73.86124
Min depth in mm seen: -444.00
Max depth in mm seen: 4396.00
but when flat on the desktop not seeing the negative min values
====================
Min depth in mm seen: 89.00
Max depth in mm seen: 1877.00
77.49446
Min depth in mm seen: 87.00
Max depth in mm seen: 1872.00
77.49256
Min depth in mm seen: 88.00
Max depth in mm seen: 1875.00
77.4907
Min depth in mm seen: 89.00
Max depth in mm seen: 1857.00
77.4888
and the ranges seem reasonable.
This is the test sketch I am using
import csi
import time
import tof
csi0 = csi.CSI()
csi0.reset()
csi0.pixformat(csi.RGB565)
csi0.framesize(csi.VGA)
csi0.snapshot(time=2000)
clock = time.clock()
tof.init()
while True:
clock.tick()
img = csi0.snapshot()
print(clock.fps())
depth, depth_min, depth_max = tof.read_depth()
print("====================")
print("Min depth in mm seen: %0.2f" % depth_min)
print("Max depth in mm seen: %0.2f" % depth_max)
Second question is how can I get the target status from the sensor. I am not sure its is currently supported in the driver - not really a python programmer so may have missed it when I was poking around in github.
UPDATE: I modified my other sketch that does the visualization:
NEGATIVE NUMBERS with objects
