Registry / other / lis3dh-async

lis3dh-async

JSON →
library0.9.3rscratesunverified

An embedded-hal-async driver for the LIS3DH accelerometer.

# Cargo.toml [dependencies] lis3dh-async = "0.9.3"
INSTALL
IMPORT
SIG · LIS3DH-ASYNC
L
lis3dh-async
otherrustv0.9.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Lis3dh
use lis3dh_async::Lis3dh;

Initialize the LIS3DH sensor and read raw acceleration data asynchronously.

use lis3dh_async::Lis3dh; use embedded_hal_async::i2c::I2c; async fn read_accel<I2C: I2c>(i2c: I2C) { let mut sensor = Lis3dh::new(i2c).await.unwrap(); let accel = sensor.accel_raw().await.unwrap(); println!("Accel: {:?}", accel); }
Debug
Known issues
gotchaRequires an async runtime (e.g., embassy) and embedded-hal-async compatible I2C implementation.
fix
Ensure you are using an async executor and the correct embedded-hal-async traits.
affects: >=0.9.0
Upgrade
Version history
0.9.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
lis3dh-async — cargo add lis3dh-async · libregistry