Closed Thiemann96 closed 2 weeks ago
function for soil moisture reading is linear only to 3V, according to SMT50 datasheet. set max value for voltage reading to 3.0V (or 50% volumetric water content)
float getSMT50Moisture(int analogPin){
float voltage = analogReadMilliVolts(analogPin)/1000.0;
if (voltage >= 3) voltage = 3.0;
return (voltage * 50.0) / 3.0;
}
Change SMT50 code for the MCU-S2 to;
Additionally, set
analogReadResolution(12);
in the setup()Block description
Describe the current behaviour if the block already exist
Expected block behaviour
Describe how the block should work or which block should be added.