changed return for moisture channels

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-07-10 18:32:02 +02:00
parent 4ecc54fbc9
commit 79d26bcca5
1 changed files with 1 additions and 3 deletions

View File

@ -17,9 +17,7 @@ def get_moisture():
sps = 250 sps = 250
adc = SDL_Adafruit_ADS1x15.ADS1x15(ic=ADS1115) adc = SDL_Adafruit_ADS1x15.ADS1x15(ic=ADS1115)
voltsCh = 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 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 voltsCh
while True: while True:
print(get_moisture()) print(get_moisture())