parent
134facf96b
commit
012f926510
5
test.py
5
test.py
|
@ -19,4 +19,7 @@ def get_moisture():
|
||||||
|
|
||||||
voltsChArray = [adc.readADCSingleEnded(0, gain, sps) / 1000, adc.readADCSingleEnded(1, gain, sps) / 1000, adc.readADCSingleEnded(2, gain, sps) / 1000, adc.readADCSingleEnded(3, gain, sps) / 1000]
|
voltsChArray = [adc.readADCSingleEnded(0, gain, sps) / 1000, adc.readADCSingleEnded(1, gain, sps) / 1000, adc.readADCSingleEnded(2, gain, sps) / 1000, adc.readADCSingleEnded(3, gain, sps) / 1000]
|
||||||
|
|
||||||
return sum(voltsChArray) / float(len(voltsChArray))
|
return sum(voltsChArray) / float(len(voltsChArray))
|
||||||
|
|
||||||
|
while True:
|
||||||
|
print(get_moisture())
|
Loading…
Reference in New Issue