from ds18b20 import DS18B20 from ecsensor import ECSensor TEMPERATURE_PIN = 1 EC_PIN = 26 BUTTON_PIN = 29 WATER_LEVEL_PIN_1 = 27 temp_sensor = DS18B20(TEMPERATURE_PIN) temperature = temp_sensor.read_temp() print('Temperature:', temperature) avg_temp = temp_sensor.read_temp(samples=3) print('Avg Temperature:', avg_temp) ec_sensor = ECSensor(ec_pin=EC_PIN, button_pin=BUTTON_PIN, temp_sensor=temp_sensor) # ec_sensor.calibrate() print(f"Single EC reading: {ec_sensor.get_ec_reading()}") print(f"Average EC reading: {ec_sensor.get_ec_reading(samples=5)}")