cardonabits / haxo-rs

Software for the haxophone
MIT License
41 stars 10 forks source link

Provide a way to calibrate pressure sensor #2

Open jcard0na opened 2 years ago

jcard0na commented 2 years ago

At the moment, the pressure baseline is captured at launch, and the max pressure hard coded based on a few measurements.

https://github.com/jcard0na/haxo-rs/blob/main/src/pressure.rs#L55

This has the risk of not working well across multiple sensors. We need a way to calibrate the sensor: record baseline, min pressure (draw) and max pressure (blow) for each device.