From 3fdb1b4ea3f64cb122aa79362ba6c36b32507431 Mon Sep 17 00:00:00 2001 From: Nick Art <100365428+NicK4rT@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:49:04 -0500 Subject: [PATCH] undo previous commit --- software/networking/examples/pyscript_main.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/software/networking/examples/pyscript_main.py b/software/networking/examples/pyscript_main.py index 06d2474..8635857 100644 --- a/software/networking/examples/pyscript_main.py +++ b/software/networking/examples/pyscript_main.py @@ -1,6 +1,5 @@ import os from machine import Pin -import asyncio import gc gc.collect() @@ -37,12 +36,7 @@ def boop(pin): switch_select = Pin(9, Pin.IN, Pin.PULL_UP) switch_select.irq(trigger=Pin.IRQ_FALLING, handler=boop) -async def main_loop(): - while True: - print(f"{int(time.ticks_ms() - start_time) / 1000}: {gc.mem_free()} bytes") - gc.collect() - await asyncio.sleep(1) - -asyncio.run(main_loop()) - - +while True: + print(f"{int(time.ticks_ms()-start_time)/1000}: {gc.mem_free()} bytes") + time.sleep(1) + gc.collect()