Crates.io | pmw3901 |
lib.rs | pmw3901 |
version | 1.0.0 |
source | src |
created_at | 2018-07-31 05:40:29.490439 |
updated_at | 2018-07-31 05:40:29.490439 |
description | Library for the PMW3901 optical flow sensor. |
homepage | |
repository | https://github.com/braincore/pmw3901-rs |
max_upload_size | |
id | 76751 |
size | 12,635 |
A library for the PMW3901 optical flow sensor.
Intended to be deployed in a linux environment with spidev.
See examples/scan.rs
.
The datasheet for the PMW3901 is sparse. The list of registers comes with little explanation. This library does the bare minimum to read pixel velocity.
In addition, the initialization write sequence is opaque and is simply copied from Bitcraze.
Use environment variables to specify the SPI bus and chip select:
PMW3901_SPI_BUS=0 PMW3901_SPI_CS=0 cargo test
Tested on the breakout board by Pesky Product.