Demonstration of the SparkFun VL53L1X Distance Sensor
- SparkFun RedBoard - Programmed with Arduino
- SparkFun Qwiic Shield for Arduino
- SparkFun Distance Sensor Breakout - 4 Meter, VL53L1X (Qwiic)
The connection between the RedBoard and the graphical user interface is realized via virtual COM drivers from FTDI. The communication is implemented through a custom serial port handshake, i.e. the RedBoard will not record or transmit new data before the previous transmission has been confirmed by the graphical user interface.
The sketch contains a basic Java-class for a circular buffer that can be used as a template for other projects. Previous sensor values are averaged with the help of the circular buffer to calculate the moving average.