Skip to content
Description

TOF that employs time-of-flight techniques to resolve distance between the emit point and the reach point of a subject, measuring the round trip time of an artificial light signal provided by a laser.

This unit integrated a distance measuring sensor VL53L0x providing accurate distance measurement whatever the target reflectance, unlike conventional technologies. It can measure absolute distances up to 2m in less than 30ms.

This unit comunicates with M5Core via I2C(0x29).

Product Features

  • High precision
  • Measure absolute distances up to 2m
  • The wavelength of laser: 940nm
  • Program Platform: Arduino, UIFlo(Blockly, Python)
  • Two Lego-compatible holes

Kit includes

  • 1x ToF Unit
  • 1x Grove Cable

Application

  • 1D gesture recognition
  • Laser Ranging
  • 3D structured light imaging(3D sensing)
  • Camera assist (ultra fast autofocus and depth of field)
Documents
Learn

Example

1. Arduino IDE

The below code is incomplete(just for usage). If you want the complete code, please click here.

#include <M5Stack.h> #include <Wire.h>  #define ToF_ADDR 0x29//the iic address of tof  #define SYSRANGE_START  0x00 #define RESULT_RANGE_STATUS 0x14 #define ToF_ADDR 0x29   //the IIC address of ToF  // declaration uint16_t dist=0;  // initialization M5.begin(); Wire.begin();// join i2c bus (address optional for master)  // read data write_byte_data_at(VL53L0X_REG_SYSRANGE_START, 0x01); read_block_data_at(VL53L0X_REG_RESULT_RANGE_STATUS, 12);//read 12 bytes once // get distance dist = makeuint16(gbuf[11], gbuf[10]);//split distance data to variable "dist" 

2. UIFlow

If you want the complete code, please click here.

More information

Schematic

PinMap

M5Core(GROVE A) GPIO22 GPIO21 5V GND TOF Unit SCL SDA 5V GND

The Time-of-Flight Ranging Unit (VL53L0X) appears in the following collections:

SKU M5-U010