Skip to content

Commit 533497e

Browse files
committed
add new methods to overview
1 parent 6b59779 commit 533497e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,19 @@ To read the value from the sensor, the ```readMoistureValue()``` method is calle
6666
uint16_t soilMoisture = mySoilSensor.readMoistureValue();
6767
```
6868

69-
The value returned is from 0 (100% wet) to 1024 (0% web - "dry"). The value is a measurement of resistance between the sensors two probes. The value range is based on the capabilities of the Analog to Digital converter (ADC) on the sensors microcontroller - it's 10 bits with a max value of 2^10 = 1024.
69+
The value returned is from 0 (100% wet) to 1023 (0% web - "dry"). The value is a measurement of resistance between the sensors two probes. The value range is based on the capabilities of the Analog to Digital converter (ADC) on the sensors microcontroller - it's 10 bits with a max value of 2^10 = 1024.
70+
71+
To read the percent moist value, call the ```readMoisturePercentage()``` method:
72+
73+
```c++
74+
float percent = mySoilSensor.readMoisturePercentage();
75+
```
76+
77+
To read the moisture ration value (0 - 1.0), call the ```readMoistureRation()``` method:
78+
79+
```c++
80+
float wetRatio = mySoilSensor.readMoistureRatio();
81+
```
7082

7183
#### Control the On-Sensor LED
7284

0 commit comments

Comments
 (0)