1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use theobserver::DeviceQuery; fn main() { let device = DeviceQuery::new() .with_pressure() .with_tilt() .first() .unwrap(); let mut pen = theobserver::watch_device(device); loop { pen.process_events(); println!("pressure: {}", pen.pressure()); } }