Closed robin13 closed 4 years ago
This issue has been automatically closed because the issue template is missing or incomplete. Filling the template is required so standard questions don't need to be asked again each time. Our ability to provide assistance is greatly hampered if few minutes are not taken to complete the issue template with the requested information. The details requested potentially affect which options to pursue. The small amount of time you will spend completing the template will also help the volunteers, providing assistance to you, to reduce the time required to help you. Please, could you be so kind on completing the issue template in order to have more information so as to properly help you? Thank you for taking the time to report, hopefully it can be resolved soon. Support Information Wiki for more information. Chat for more user experience. Community for forum. Code of Conduct Contributing Guideline and Policy
I am using an analogue capacitive soil moisture sensor which outputs a voltage. Reading using the Analog input on A0 I get a value between 720 (dry) and 200 (wet). That's small subsection of the entire range 0 -> 1023, but also it is very difficult for me to represent in my head (or in a graph) how "wet" the soil is when I e.g. get the value 250 (quite wet). What I would like is to be able to output the equivalent 0->100 reading. I imagine this being configured with
AdcParam
something like:Where 4 = Remap analogue values.
<param1>
= lower limit<param2>
= upper limit<param3>
= value for lower limit<param4>
= value for upper limitIn the example I have deliberately set the value for upper limit to a number lower than the value for upper limit because in my example I want 0 to be "dry" and 100 to be "wet", so while
<param1>
should always be less than<param2>
,<param3>
and<param4>
should just be a range where it is not important which is greater. So going back to the example above, the value250
would be:So the result
90
(of 100) is much more meaningful than 250 as a measure of "wetness".