Other Arduino Codes and Videos by Robojax

Measure distance with Laser T-of-Flight VL53L0X with Arduino Robojax.com

Using VL53L0X Laser Distance meter in Arduino (6 pin in a row)

This video shows you how to use the VL53L0X module to measure distance. Library from Pololu Download the library Arduino Library Pololu Download (getHub)
Or download the library directly from our website Arduino Library VL523L0X Pololu
To download the datasheet of VL530X click here.

Source code for VL523L0X Distance measurment module for Arduino


/* This example shows how to use continuous mode to take
range measurements with the VL53L0X. It is based on
vl53l0x_ContinuousRanging_Example.c from the VL53L0X API.

The range readings are in units of mm. 

Original source: https://github.com/pololu/vl53l0x-arduino
Modefied by Ahmad Nejrabi for RoboJax.com
Date modefied: Sep 26, 2017

#include <Wire.h>
#include <VL53L0X.h>

VL53L0X sensor;

void setup()


  // Start continuous back-to-back mode (take readings as
  // fast as possible).  To use continuous timed mode
  // instead, provide a desired inter-measurement period in
  // ms (e.g. sensor.startContinuous(100)).

void loop()
  int distance =sensor.readRangeContinuousMillimeters();
 distance = distance -55;
  Serial.print("Distance: ");
  if (sensor.timeoutOccurred()) { Serial.print(" TIMEOUT"); }