embedded-camsense-x1 0.1.0

Platform-agnostic Rust driver for the Camsense-X1 LiDAR sensor.
Documentation

Embedded Camsense-X1

Crates.io Documentation MIT/Apache-2.0 licensed Build Status

Platform agnostic Rust driver for the Camsense-X1 LiDAR sensor, based on the embedded-hal traits.

This library provides a no_std interface for interacting with the Camsense-X1 LiDAR sensor.

Most of the information about the inner workings of the LiDAR was taken from:

Features

  • no_std & zero-allocations: Fully compatible with bare-metal and RTOS targets. Uses fixed-size arrays and avoids heap allocation.
  • Platform-Agnostic I/O: Built on embedded-hal, embedded-io traits for blocking, embedded-hal-async and embedded-io-async for asynchronous communication, supporting any UART peripheral and delay backend.
  • Blocking and Asynchronous Interfaces: Provides interfaces for both blocking and asynchronous (async feature) communication.
  • Robust Protocol Synchronization: Const-generic state machine for byte-level frame detection with automatic recovery from noisy UART lines.
  • Checksum Validation: Implements exact SDK algorithm (linear accumulator with 15-bit folding) to silently drop corrupted frames.

Device

The Camsense-X1 is a cost-effective consumer-level LiDAR with the following characteristics[^1]:

Description Parameter value
Operating range 100mm - 8000mm
Repeatability <0.5%
Absolute accuracy <2%
Angle resolution 0.9°
Rotating speed 312±10 RPM
Power consumption <2W
Laser light source 780nm EEL/808nm VCSEL laser
Laser safety level IEC60825 Class I

[^1]: Camsense-X1 Product Page

Examples

See the examples directory for examples of using the Camsense-X1 with different micro-controllers and boards.

Feature Flags

  • defmt - Enable logging output using defmt and implement defmt::Format on certain types.
  • async - Enable asynchronous interface.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.