parent
134facf96b
commit
012f926510
3
test.py
3
test.py
|
@ -20,3 +20,6 @@ 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]
|
||||
|
||||
return sum(voltsChArray) / float(len(voltsChArray))
|
||||
|
||||
while True:
|
||||
print(get_moisture())
|
Loading…
Reference in New Issue