ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
vl53l0x.h File Reference

ST VL53L0X / VL53L1X optical time-of-flight ranging codec (PROTOCORE_ENABLE_VL53L0X). More...

#include "protocore_config.h"

Go to the source code of this file.

Detailed Description

ST VL53L0X / VL53L1X optical time-of-flight ranging codec (PROTOCORE_ENABLE_VL53L0X).

The VL53L0X emits an infrared pulse and times the round-trip to a target, reporting distance in millimeters - contactless ranging and gesture, bridged to the same telemetry sink as the other field sensors. Its documented register interface is small: check IDENTIFICATION_MODEL_ID (0xC0 == 0xEE), start ranging via SYSRANGE_START, poll RESULT_INTERRUPT_STATUS for data-ready, read the 16-bit range from RESULT_RANGE_STATUS + 10, then clear the interrupt.

This codec is pure and host-tested: ::protocore_vl53l0x_range_mm combines the range register pair, ::protocore_vl53l0x_data_ready decodes the interrupt-status byte, and ::protocore_vl53l0x_range_valid checks the device range-status field. On an ESP32 the binding runs the ranging loop over I2C (Wire); only that touches hardware. Note: ST's optional tuning blob (for best accuracy) is not applied - default-settings ranging via the documented registers.

Definition in file vl53l0x.h.