yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
Laser Ranging Module📖
1.Introduction of module
  • Introduction
2.Tutorials
Arduino
  • 1.Three ranging modes
  • 2. Digital tube display distance
Raspberry Pi
  • 1.Laser ranging
  • 2. OLED display distance
STM32
  • Laser ranging
Download ZIP

Welcome to Laser Ranging Module repository

2. OLED display distance


1. Learning target

In this course, we mainly learn to use the Raspberry Pi and laser ranging module. Then, use the OLED on the RGB Cooling HAT to display the current distance.

2. Preparation

2.1 The laser ranging module uses I2C communication, and connect the SDA and SCL of the module to the SDA and SCL pins of the Raspberry Pi board. VCC and GND are respectively connected to 5V and GND of the Raspberry Pi.

!Tip: Raspberry Pi needs to enable I2C service.

image.png 

2.2 After the Raspberry Pi I2C is enabled, input command lmusb in the terminal to check whether the I2C is successfully started.

image.png 

2.3 Download i2c-tools, the software can monitor the usage and faults of hardware devices.

Input command: sudo apt-get install i2c-tools

Input command: i2cdetect -y -a 1 in the terminal.

Check if there is an IIC device: 0x52 or 0x29

3. About code

3.1 Transfer this file into Raspberry Pi system

image.png 

3.2 Input following command to enter VL53L0X folder.

cd VL53L0X-python

3.3 Input following command to compile this file.

make

3.4 Input following command to enter python folder.

cd python

3.5 Input command to run program

python VL53L0X_Cooling_HAT.py

4. Phenomenon

After the program is downloaded successfully, after the program is running, the RGB Cooling HAT will light up the purple breathing light, the cooling fan rotates with 50% speed. At the same time, OLED displays the current CPU usage, current temperature, and distance.


Laser ranging
Laser ranging

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文