there is a driver that once loaded will provide interfaces to read the vl53 part.
how ever for the driver to work you have to add the part to the device tree. or create and load an overlay
the interfaces should be at these locations. ( this is from c-code i did on a raspberry pi for this device)
lots of learning if you move forward with the driver. #define DEVICE_PATH “/sys/bus/iio/devices/iio:device” #define DEVICE_NAME “vl53l0x” #define DEV_PATH “/dev/iio:device”
this is an example that show how to compile the dts, not the best for i2c, and it your a beginner.
here is an overlay example, assuming your using i2c2 buss (don’t think the code formatting held)
/dts-v1/;
/plugin/;
to help you a little more,
this all assumes that you connected your lv53 device to i2c2 buss (correctly)
edit /boot/uEnv.txt
add/change: uboot_overlay_addr4=/lib/firmware/BBB-VL53-00A0.dtbo
make sure the next line is not commented out.
enable_uboot_overlays=1
the overlay above is is named
BBB-VL53-00A0.dts
on the beaglebone black
dtc -O dtb -o BBB-VL53-00A0.dtbo -b 0 -@ BBB-VL53-00A0.dts
copy the dtbo to /lib/firmware
after rebooting, if all is good, this path should exist
cat /sys/bus/iio/devices/iio:device1/in_distance_raw
while booting, if you have a serial console connected, ya should see this during boot time.
uboot_overlays: [fdt_buffer=0x60000] …
uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo …
654 bytes read in 173 ms (2.9 KiB/s)
uboot_overlays: loading /lib/firmware/BBB-VL53-00A0.dtbo …
at command prompt, lsmod should have
vl53l0x_i2c, in the output.