how to read the percentages from soil moisture ??? I have capacitive soil moisture v1.2 and i have connected to 3.3v … and the code ist :
void getSoilMoist(void)
{
int i = 0;
soilMoist = 0;
for (i = 0; i < 10; i++) //
{
soilMoist += analogRead(SOIL_MOIST_1_PIN);
delay(20);
}
soilMoist = soilMoist / (i);
soilMoist = map(soilMoist, 1023, 0, 0, 100);
Blynk.virtualWrite(V4, soilMoist);
The values are 99% always inside and out the pot of the plant …
whyyyyy? What i make wrong ???
Somebody can help me ???