Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 23 in printed book and digital formats -- plus a one-year subscription (beginning with 24.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are short, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 24.5 ('LiDAR')
Instant purchase and download via GumRoad!

FEATURE

TF-Luna LiDAR Range Sensor

Distance Measurement with Raspberry Pi and Xojo

Issue: 24.5 (September/October 2026)
Author: Eugene Dakin
Author Bio: Eugene works as a Senior Oilfield Technical Specialist. He has university degrees in the disciplines of Engineering, Chemistry, Biology, Business, and a Ph.D. in Chemical Engineering. He is the author of dozens of books on Xojo available on the xdevlibrary.com website.
Article Description: No description available.
Article Length (in bytes): 17,589
Starting Page Number: 12
Article Number: 24503
Resource File(s):

Download Icon project24503.zip Updated: 2026-08-31 13:08:44

Related Link(s): None

Excerpt of article text...

This is a distance detection system that works on the principle of radar (DAR) and uses light from a laser (Li). Placing the two sections together becomes LiDAR. Low-cost time-of-flight (ToF) LiDAR sensors have opened up practical distance-sensing applications for hobbyists, researchers, and embedded developers. The TF-Luna from Benewake is one of the most compact and affordable modules available, providing accurate single-point distance measurement in a small package. It is ideal for robotics, obstacle detection, level sensing, and environmental monitoring.

In this article, we will walk through how to use the TF-Luna with:

  • A Raspberry Pi

  • The Xojo programming language (API 2)

  • The lgpio library for low-level hardware access

  • I2C communication

...End of Excerpt. Please purchase the magazine to read the full article.