The VL53L0X Laser Distance Sensor Module – Black Version is a high-accuracy Time-of-Flight (ToF) ranging sensor capable of measuring absolute distances up to 2 meters with millimeter precision. Unlike traditional infrared sensors, the VL53L0X uses a Class 1 940nm laser emitter to deliver reliable readings even in changing lighting conditions. This Black Version features an upgraded PCB design for enhanced stability, better compatibility, and sleek integration into robotics, automation, and measurement projects. Key Features Time-of-Flight (ToF) laser technology for superior accuracy Measurement range: 30mm to 2000mm High-speed measurement with rapid response time Eye-safe 940nm Class 1 IR laser Simple I²C digital interface for easy microcontroller integration Compact black PCB for space-saving designs Low power consumption for battery-powered projects Specifications Sensor Model: VL53L0X Measurement Range: ~30mm – 2000mm (environment dependent) Operating Voltage: 2.6V – 5V Interface: I²C (up to 400kHz) Field of View: ~25° Light Source: 940nm invisible laser (Class 1) Power Consumption: ~20mW active Dimensions: ~20 × 12 × 3 mm Operating Temperature: –20°C to +70°C Applications Robotics obstacle detection and avoidance Drone altitude control Precision distance measuring tools Object detection and proximity sensing Smart home automation systems
VL53L0X Arduino Code Viewer
Single Sensor
Continuous Mode
Two Sensors (XSHUT)
Pin Connections Table 1
Board Sensor Pin Connection VL53L0X VCC/GND/SDA/SCL 3.3V / GND / board SDA / board SCL
VL53L0X Laser Distance Sensor Module Black Version - Arduino Uno
VL53L0X Laser Distance Sensor Module Black Version - Arduino Nano
VL53L0X Laser Distance Sensor Module Black Version - Arduino Mega
VL53L0X Laser Distance Sensor Module Black Version - ESP32
VL53L0X Laser Distance Sensor Module Black Version - ESP8266
VL53L0X Laser Distance Sensor Module Black Version - STM32
VL53L0X Laser Distance Sensor Module Black Version - Raspberry Pi Pico
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // I2C wiring for Arduino Uno: A4=SDA, A5=SCL. VCC->3. 3V or 5V per module label, GND->GND.
6 #include <Wire.h>
7 #include <Adafruit_VL53L0X.h>
8
9 Adafruit_VL53L0X lox = Adafruit_VL53L0X();
10
11 void setup () {
12 Serial.begin (115200 );
13 Wire.begin();
14 if (!lox.begin()) {
15 Serial.println ("VL53L0X not found - check wiring!");
16 while (1 ) delay (10 );
17 }
18 }
19
20 void loop () {
21 VL53L0X_RangingMeasurementData_t measure;
22 lox.rangingTest(&measure, false);
23
24 if (measure.RangeStatus != 4 ) { // 4 = out of range
25 Serial.print ("Distance: "); Serial.print (measure.RangeMilliMeter); Serial.println (" mm");
26 } else {
27 Serial.println ("Out of range");
28 }
29
30 delay (200 );
31 }
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // I2C wiring for Arduino Nano: A4=SDA, A5=SCL. VCC->3. 3V or 5V per module label, GND->GND.
6 #include <Wire.h>
7 #include <Adafruit_VL53L0X.h>
8
9 Adafruit_VL53L0X lox = Adafruit_VL53L0X();
10
11 void setup () {
12 Serial.begin (115200 );
13 Wire.begin();
14 if (!lox.begin()) {
15 Serial.println ("VL53L0X not found - check wiring!");
16 while (1 ) delay (10 );
17 }
18 }
19
20 void loop () {
21 VL53L0X_RangingMeasurementData_t measure;
22 lox.rangingTest(&measure, false);
23
24 if (measure.RangeStatus != 4 ) { // 4 = out of range
25 Serial.print ("Distance: "); Serial.print (measure.RangeMilliMeter); Serial.println (" mm");
26 } else {
27 Serial.println ("Out of range");
28 }
29
30 delay (200 );
31 }
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // I2C wiring for Arduino Mega: D20=SDA, D21=SCL. VCC->3. 3V or 5V per module label, GND->GND.
6 #include <Wire.h>
7 #include <Adafruit_VL53L0X.h>
8
9 Adafruit_VL53L0X lox = Adafruit_VL53L0X();
10
11 void setup () {
12 Serial.begin (115200 );
13 Wire.begin();
14 if (!lox.begin()) {
15 Serial.println ("VL53L0X not found - check wiring!");
16 while (1 ) delay (10 );
17 }
18 }
19
20 void loop () {
21 VL53L0X_RangingMeasurementData_t measure;
22 lox.rangingTest(&measure, false);
23
24 if (measure.RangeStatus != 4 ) { // 4 = out of range
25 Serial.print ("Distance: "); Serial.print (measure.RangeMilliMeter); Serial.println (" mm");
26 } else {
27 Serial.println ("Out of range");
28 }
29
30 delay (200 );
31 }
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // I2C wiring for ESP32: GPIO21=SDA, GPIO22=SCL. VCC->3. 3V or 5V per module label, GND->GND.
6 #include <Wire.h>
7 #include <Adafruit_VL53L0X.h>
8
9 Adafruit_VL53L0X lox = Adafruit_VL53L0X();
10
11 void setup () {
12 Serial.begin (115200 );
13 Wire.begin();
14 if (!lox.begin()) {
15 Serial.println ("VL53L0X not found - check wiring!");
16 while (1 ) delay (10 );
17 }
18 }
19
20 void loop () {
21 VL53L0X_RangingMeasurementData_t measure;
22 lox.rangingTest(&measure, false);
23
24 if (measure.RangeStatus != 4 ) { // 4 = out of range
25 Serial.print ("Distance: "); Serial.print (measure.RangeMilliMeter); Serial.println (" mm");
26 } else {
27 Serial.println ("Out of range");
28 }
29
30 delay (200 );
31 }
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // I2C wiring for ESP8266: D2(GPIO4)=SDA, D1(GPIO5)=SCL. VCC->3. 3V or 5V per module label, GND->GND.
6 #include <Wire.h>
7 #include <Adafruit_VL53L0X.h>
8
9 Adafruit_VL53L0X lox = Adafruit_VL53L0X();
10
11 void setup () {
12 Serial.begin (115200 );
13 Wire.begin();
14 if (!lox.begin()) {
15 Serial.println ("VL53L0X not found - check wiring!");
16 while (1 ) delay (10 );
17 }
18 }
19
20 void loop () {
21 VL53L0X_RangingMeasurementData_t measure;
22 lox.rangingTest(&measure, false);
23
24 if (measure.RangeStatus != 4 ) { // 4 = out of range
25 Serial.print ("Distance: "); Serial.print (measure.RangeMilliMeter); Serial.println (" mm");
26 } else {
27 Serial.println ("Out of range");
28 }
29
30 delay (200 );
31 }
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // I2C wiring for STM32: PB7=SDA, PB6=SCL (Blue Pill / F103C8). VCC->3. 3V or 5V per module label, GND->GND.
6 #include <Wire.h>
7 #include <Adafruit_VL53L0X.h>
8
9 Adafruit_VL53L0X lox = Adafruit_VL53L0X();
10
11 void setup () {
12 Serial.begin (115200 );
13 Wire.begin();
14 if (!lox.begin()) {
15 Serial.println ("VL53L0X not found - check wiring!");
16 while (1 ) delay (10 );
17 }
18 }
19
20 void loop () {
21 VL53L0X_RangingMeasurementData_t measure;
22 lox.rangingTest(&measure, false);
23
24 if (measure.RangeStatus != 4 ) { // 4 = out of range
25 Serial.print ("Distance: "); Serial.print (measure.RangeMilliMeter); Serial.println (" mm");
26 } else {
27 Serial.println ("Out of range");
28 }
29
30 delay (200 );
31 }
1 //ekostra.com
2 //electronics store in egypt
3 //+201008896258
4
5 // I2C wiring for Raspberry Pi Pico: GPIO4=SDA, GPIO5=SCL. VCC->3. 3V or 5V per module label, GND->GND.
6 #include <Wire.h>
7 #include <Adafruit_VL53L0X.h>
8
9 Adafruit_VL53L0X lox = Adafruit_VL53L0X();
10
11 void setup () {
12 Serial.begin (115200 );
13 Wire.begin();
14 if (!lox.begin()) {
15 Serial.println ("VL53L0X not found - check wiring!");
16 while (1 ) delay (10 );
17 }
18 }
19
20 void loop () {
21 VL53L0X_RangingMeasurementData_t measure;
22 lox.rangingTest(&measure, false);
23
24 if (measure.RangeStatus != 4 ) { // 4 = out of range
25 Serial.print ("Distance: "); Serial.print (measure.RangeMilliMeter); Serial.println (" mm");
26 } else {
27 Serial.println ("Out of range");
28 }
29
30 delay (200 );
31 }
Project Notes: I2C time-of-flight laser distance sensor, up to ~2m range.