From e2c5f83493c7928d29aba80c1c837c1f97c14a1f Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Tue, 17 Dec 2024 16:23:27 +0000 Subject: [PATCH] Replace monitored sleep in wifi_scan --- examples/modules/rm2_wireless/cheerlights.py | 3 ++- examples/modules/rm2_wireless/wifi_scan.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/modules/rm2_wireless/cheerlights.py b/examples/modules/rm2_wireless/cheerlights.py index 47ee95e..c336de7 100644 --- a/examples/modules/rm2_wireless/cheerlights.py +++ b/examples/modules/rm2_wireless/cheerlights.py @@ -1,3 +1,4 @@ +import time import network import requests from pimoroni_yukon import Yukon @@ -60,7 +61,7 @@ # Wait until the connection is established while not wlan.isconnected(): print('Waiting for connection...') - yukon.monitored_sleep(CONNECTION_INTERVAL) + time.sleep(CONNECTION_INTERVAL) # Print out our IP address print(f'Connected on {wlan.ifconfig()[0]}') diff --git a/examples/modules/rm2_wireless/wifi_scan.py b/examples/modules/rm2_wireless/wifi_scan.py index 26208bf..ce594cd 100644 --- a/examples/modules/rm2_wireless/wifi_scan.py +++ b/examples/modules/rm2_wireless/wifi_scan.py @@ -1,3 +1,4 @@ +import time import network import binascii from pimoroni_yukon import Yukon @@ -35,8 +36,7 @@ w[2], w[3], w[4], w[5]) print() - # Monitor sensors for a number of seconds, recording the min, max, and average for each - yukon.monitored_sleep(SCAN_INTERVAL) + time.sleep(SCAN_INTERVAL) finally: # Put the board back into a safe state, regardless of how the program may have ended