Reference

This article serves as a reference for Arduino users, detailing the library files applicable to the DFRobot LIDAR07, communication protocols (UART & I2C), API descriptions, compatibility with various MCUs, and the TOF sensor principle, alongside supplementary resources.

Library

Library files applicable to Arduino: DFRobot LIDAR07 Library.
Installation instructions: (About how to install the library?)

Communication Protocol Description

The product supports UART and I2C communication:

  • I2C: Uses SCL (PIN1) and SDA (PIN2) lines.
  • UART: Uses TX (PIN5, data transmitting) and RX (PIN6, data receiving) lines. Baud rate: 115200.

API Description

Callable interfaces and functions used in the sample code:

  • DFROBOT_LIDAR07_IIC LIDAR07: Object for I2C communication mode.
  • DFROBOT_LIDAR07_UART LIDAR07: Object for UART communication mode.
  • begin(): Initializes the sensor. Returns true if successful.
  • getVersion(): Retrieves the sensor firmware version (format: XX.XX.XX.XX). Returns a 32-bit integer.
  • startFilter(): Enables the integrated filtering algorithm.
  • stopFilter(): Stops the filtering algorithm (not used in the sample).
  • startMeasure(): Triggers distance measurement. Returns true if successful.
  • getDistanceMM(): Returns the measured distance in millimeters.
  • getSignalAmplitude(): Returns the signal amplitude (range: 3400LSB–7000LSB).

Additional Information

I2C Compatibility

MCU Work Well Work Wrong Untested Remarks
Arduino UNO
FireBeetle ESP32
FireBeetle ESP8266
FireBeetle M0
Leonardo
Micro:bit Voltage unsupported, large data error
Arduino Mega2560

UART Compatibility

MCU Work Well Work Wrong Untested Remarks
Arduino UNO Unstable when software serial port baud rate is 115200
FireBeetle ESP32
FireBeetle ESP8266
FireBeetle M0
Leonardo
Micro:bit Not support
Arduino Mega2560

Principle

The product is a single-point TOF (Time of Flight) IR distance sensor. It uses an 850nm LED light source and optimized optical/structural/circuit designs. The integrated filtering algorithm reduces measurement noise.
TOF Principle: Calculates distance by measuring the time light takes to travel from the sensor to the target and back (using the speed of light: ( distance = \frac{time \times speed_of_light}{2} )).

Other Supplementary Information

Was this article helpful?

TOP