diff --git a/code/src/main.py b/code/src/main.py index a72affc..10107d3 100644 --- a/code/src/main.py +++ b/code/src/main.py @@ -6,6 +6,7 @@ from micropyserver import MicroPyServer from micropyserver_utils import send_response, get_request_post_params import ntptime import os +import io DHT_PIN = 26 RELAY_PIN = 4 @@ -13,11 +14,11 @@ UPDATE_INTERVAL_S = 60 MAX_LOG_SIZE = 3 * 1024 * 1024 # MegaByte name = "Test Sensor" + humidity_limit_path = 'humidity_limit' sensor_log_path = 'sensors.log' -sensor_log_path = 'sensors.log' -log_file = None -log_cursor_file = None +log_file: io.TextIOWrapper +log_cursor_file: io.TextIOWrapper server = MicroPyServer() dht = dht.DHT22(Pin(DHT_PIN))