Crate adafruit_mpr121

Source
Expand description

Rust version of access to adafruit MPR121 capacitive touch sensor HAT under Linux. Completely inspired by this and that original adafruit repos. It only works with 12 input touch, numbered from 0 to 11 product info.

Default initialization:

use adafruit_mpr121::Mpr121;
let mut touch_sensor = Mpr121::new_default(1).expect("Failed to initialize sensor");
let status = touch_sensor.touch_status().unwrap();
println!("Touch status: {}", status);

Structs§

Mpr121
Manages adafruit MPR121 capacitive sensor HAT I2C device.
Mpr121TouchStatus
Touch status for all pins
Mpr121TouchStatusIterator
Convenient iterator for pins in Mpr121TouchStatus

Constants§

MPR121_I2CADDR_DEFAULT
Default I2C address for MPR121
MPR121_RELEASE_THRESHOLD_DEFAULT
Default release threshold set for MPR121
MPR121_TOUCH_THRESHOLD_DEFAULT
Default touch threshold set for MPR121

Type Aliases§

Mpr121Error
Basic error type, mostly I2C errors