cfsamson / embedded-stemma-soil-sensor

Library for interfacing with the Adafruit STEMMA Soil Sensor
Other
4 stars 0 forks source link

Can we add a link to alternate of measuring capacitance in Rust #1

Open joeatbayes opened 2 months ago

joeatbayes commented 2 months ago

I wrote a sample of how to measure capacitance in Rust that uses 1 GPIO pin and a resistor. I may be worth adding a link for those who don't have the Adafruit sensor or who want to measure several sources of variable capacitance.

https://github.com/joeatbayes/embedded-rust-examples/tree/main/ex-gpio-change-pin-direction-var-cap-read-1-pin This version measures how fast voltage drops across the resistor.

This one measures how fast voltage rises across a resistor but needs 2 pins one of which must be a high drive IO pin. https://github.com/joeatbayes/embedded-rust-examples/tree/main/ex-gpio-measure-time-to-change-high-to-low It should be faster due to the high drive pins ability to rapidly drain the capacitor.

cfsamson commented 2 months ago

I took a look at your work and that's really cool. Sure, we can link to these two samples in the Readme.