diff --git a/shroom_controller.py b/shroom_controller.py index aaf1419..0ddd1ca 100644 --- a/shroom_controller.py +++ b/shroom_controller.py @@ -11,7 +11,7 @@ SERIAL_PATH = "/dev/ttyUSB0" SERIAL_BAUD = 115200 SAMPLE_PERIOD = 0.2 -DECIMATION_RATE = 10 +DECIMATION_RATE = 5 is_mock = os.environ['MOCK'] if is_mock: @@ -167,7 +167,6 @@ try: humidity = float(parts[0]) temp = float(parts[1]) volts = float(parts[2]) - print(humidity, temp, volts) if first_sample: humidifier_history[:] = humidity first_sample = False @@ -188,6 +187,7 @@ try: humidifier.toggle(s) if frame_num == 0: + print(humidity, temp, volts) update = { "data": { "time": int(now*1000), diff --git a/shroom_pipe.py b/shroom_pipe.py index 6b84acb..01491b5 100644 --- a/shroom_pipe.py +++ b/shroom_pipe.py @@ -13,7 +13,9 @@ async def connect_stdin_stdout(): async def pipe_loop(reader, writer): while True: + #res = await reader.readline() res = await reader.read(1024) + #res = await reader.readchunk() if not res: break writer.write(res)