Mini laser distance sensor module for accurate distance measurement with long range, suitable for Arduino, ESP8266 and ESP32.
SKU: OT5865 Article number: XR358 EAN: 8720828223574 Location: H08.01
Alternative
TOF200C VL53L0X Distance Sensor Time-Of-Flight very accurate
€ 10,90
View this alternative
How to connect the TOF400C-VL53L1X Distance Sensor Time-Of-Flight 4-400cm to an Arduino UNO or ESP32, with an example sketch you can upload straight away.
Connect the TOF400C VL53L1X Time-of-Flight sensor to your Arduino Uno using I2C. The sketch initializes the sensor in long-distance mode (up to 4 meters) and continuously measures distance with millimeter precision. Open the Serial Monitor at 115200 baud to view real-time distance readings.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : VL53L1X Time-of-Flight Distance Measurement
* Board : Arduino UNO (arduino:avr:uno)
* Parts : TOF400C-VL53L1X Distance sensor Time-Of-Flight very accurate 4-400cm
* Libraries : VL53L1X 1.3.1
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
#include <Wire.h>
#include <VL53L1X.h>
VL53L1X sensor;
void setup() {
Serial.begin(115200);
Wire.begin();
Wire.setClock(400000); // 400 kHz I2C
sensor.setTimeout(500);
if (!sensor.init()) {
Serial.println(F("Failed to detect and initialize sensor!"));
while (1) {
delay(1000);
}
}
// Use Long distance mode (up to 400 cm)
sensor.setDistanceMode(VL53L1X::Long);
sensor.setMeasurementTimingBudget(50000);
// Start continuous ranging with 50 ms period
sensor.startContinuous(50);
Serial.println(F("VL53L1X sensor ready. Reading distances..."));
}
void loop() {
uint16_t distanceMm = sensor.read();
Serial.print(F("Distance: "));
Serial.print(distanceMm);
Serial.print(F(" mm ("));
Serial.print(distanceMm / 10.0, 1);
Serial.print(F(" cm)"));
if (sensor.timeoutOccurred()) {
Serial.print(F(" [TIMEOUT]"));
}
Serial.println();
delay(100);
}
Required libraries: VL53L1X 1.3.1
Wiring diagram and example code generated by Codey.online — https://www.codey.online
This circuit connects a VL53L1X laser time-of-flight sensor to the ESP32 over I2C to measure distances from 4 cm up to 400 cm. Open the Serial Monitor at 115200 baud to view real-time distance readings in millimeters.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : VL53L1X Time-of-Flight Distance Meter
* Board : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
* Parts : TOF400C-VL53L1X Distance sensor Time-Of-Flight very accurate 4-400cm
* Libraries : VL53L1X 1.3.1
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
#include <Wire.h>
#include <VL53L1X.h>
VL53L1X sensor;
void setup() {
Serial.begin(115200);
Wire.begin(21, 22);
Wire.setClock(400000);
sensor.setTimeout(500);
if (!sensor.init()) {
Serial.println("Failed to detect and initialize VL53L1X sensor!");
while (1) {
delay(10);
}
}
// Use Long distance mode (up to 4 meters) and 50 ms timing budget
sensor.setDistanceMode(VL53L1X::Long);
sensor.setMeasurementTimingBudget(50000);
sensor.startContinuous(50);
Serial.println("VL53L1X ready! Measuring distance...");
}
void loop() {
uint16_t distanceMm = sensor.read();
if (sensor.timeoutOccurred()) {
Serial.println("Measurement timeout!");
} else {
Serial.print("Distance: ");
Serial.print(distanceMm);
Serial.print(" mm (");
Serial.print(distanceMm / 10.0, 1);
Serial.println(" cm)");
}
delay(100);
}
Required libraries: VL53L1X 1.3.1
Wiring diagram and example code generated by Codey.online — https://www.codey.online
Mini laser distance sensor module with an accuracy of 1mm and large range.
Model: TOF400C-VL53L1X
Voltage: 3V to 5V
Current consumption: 40 mA (max)
Distance: 4cm to 400cm
Connections:
- VIN
- GND
- SDA
- SCL
- INT
- SHUT
Communication: the I2C communication protocol (fully compatible with 3-5V systems)
Suitable for Arduino, ESP8266 and ESP32.
Multiple sensors on 1 I2C line possible because the sensors can be assigned an I2C address via software.
The TOF400C-VL53L1X Time Of Flight laser sensor is a very precise and reliable sensor that can be used for a wide range of applications, including distance measurement, motion detection, and navigation.
One of the main advantages of this sensor is its precision. The sensor uses laser technology to measure the distance to an object, resulting in much more accurate results than, for example, an infrared sensor. This makes the sensor suitable for use in drones, industrial automation, and robots.
In addition, the sensor is also very easy to use. It is compatible with a wide range of microcontroller platforms, including Arduino, Raspberry Pi, and STM32, and there are many examples and libraries available to help you integrate the sensor into your project.
Finally, the sensor is also very small and lightweight, making it easy to integrate into a wide range of applications. The 2 screw holes also make it very easy to securely mount this sensor.
Dimensions
Length: 1.3cm
Width: 1.04cm
Height: 0.32cm

| Dimensions | 1,3 cm x 1,04 cm x 0,32 cm |
|---|---|
| Interface | I2C |
| Suitable for | Arduino, ESP8266 and ESP32 |
| Power consumption | 40 mA |
| Model | TOF400C-VL53L1X |
| Distance | 4cm to 400cm |
4 meter range!
TOF400C-VL53L1X Distance Sensor Time-Of-Flight 4-400cm