Other Arduino Codes and Videos by Robojax

Using VL53L0X Laser Distance meter in Arduino

Using VL53L0X Laser Distance meter in Arduino

This video shows you how to use the VL53L0X module to measure distance.

 /* This example shows how to use continuous mode to take
range measurements with the VL53L0X.
// Original Source from Adafruit https://github.com/adafruit/Adafruit_VL53L0X
Modefied by Ahmad Nejrabi for RoboJax.com
Date modefied: Sep 26, 2017
#include "Adafruit_VL53L0X.h"

Adafruit_VL53L0X lox = Adafruit_VL53L0X();

void setup() {

  // wait until serial port opens for native USB devices
  while (! Serial) {
  Serial.println("Robojax Test");
  if (!lox.begin()) {
    Serial.println(F("Failed to boot VL53L0X"));
  // power 
  Serial.println(F("VL53L0X API Simple Ranging example


void loop() {
  VL53L0X_RangingMeasurementData_t measure;
  Serial.print("Reading a measurement... ");
  lox.rangingTest(&measure, false); // pass in 'true' to get debug data printout!

  if (measure.RangeStatus != 4) {  // phase failures have incorrect data
    Serial.print("Distance (mm): "); Serial.println(measure.RangeMilliMeter);
  } else {
    Serial.println(" out of range ");

If you found this tutorial helpful, please support me so I can continue creating content like this. You can support me on Patreon ( Launched June 14, 2019): http://bit.ly/2ZnITLz

Or support me via PayPal