Skip to content

Commit

Permalink
Replace monitored sleep in wifi_scan
Browse files Browse the repository at this point in the history
  • Loading branch information
ZodiusInfuser committed Dec 17, 2024
1 parent 1aa5a0e commit e2c5f83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/modules/rm2_wireless/cheerlights.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import time
import network
import requests
from pimoroni_yukon import Yukon
Expand Down Expand Up @@ -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]}')
Expand Down
4 changes: 2 additions & 2 deletions examples/modules/rm2_wireless/wifi_scan.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import time
import network
import binascii
from pimoroni_yukon import Yukon
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e2c5f83

Please sign in to comment.