Crates.io | rplidar-rppal |
lib.rs | rplidar-rppal |
version | 0.1.0 |
source | src |
created_at | 2024-10-11 10:52:54.250547 |
updated_at | 2024-10-11 10:52:54.250547 |
description | A Rust crate for accessing RpLidar A1 sensor data using the rppal library on a Raspberry Pi. |
homepage | |
repository | |
max_upload_size | |
id | 1405199 |
size | 10,183 |
This project contains a Rust-based implementation for interfacing with the RpLidar A1 device using a Raspbery Pi.
RpLidarA1
: RpLidar Struct ImplementationRpLidarA1
struct that handles motor control and UART communication with the RpLidar A1 device.Command
enum, which includes common operations such as Stop
, Scan
, GetInfo
, and more.send_command
: Sends a command to the LIDAR.run_with_callback
: Starts the LIDAR scan and pipes data to a callback function for further processing.hello_lidar
: Example Implementation for Using RpLidar A1 on a Raspberry Pirppal
crate to interface with the GPIO and UART pins, setting up UART communication at a baud rate of 115,200.run_with_callback
method from RpLidarA1
is used to handle incoming LIDAR data and parse it using a custom callback, parse_scan_data
.parse_scan_data
function extracts the following information from LIDAR data:
rppal
crate for GPIO and UART communication.cargo build
.cargo run --example hello_lidar
.