Feb-28-2023, 05:28 PM
I just went to turn the Wifi chip on, and scan to see which wifi networks are available.
# wifi_test.py import machine import sys import network import utime import urequests # Create a station object to store our connection station = network.WLAN(network.STA_IF) station.active("up") while len(station.scan()) == 0: print "Waiting for Wifi..." print(station.scan())I get this error:
Error:Traceback (most recent call last):
File "<stdin>", line 14
SyntaxError: invalid syntax
I am trying to use len(), because station.scan will output an empty list if the wifi is not ready (I think).