forgott test

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-07-10 00:24:32 +02:00
parent 134facf96b
commit 012f926510
1 changed files with 4 additions and 1 deletions

View File

@ -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())