Skip to content

Commit 0b6ed77

Browse files
authored
fixed issue of Network object in code.py of example for Arduino Nano RP2040 Connect
CircuitPython version: 9.2.4
1 parent 85c13fc commit 0b6ed77

File tree

1 file changed

+2
-2
lines changed
  • Arduino_Nano_RP2040_Connect/arduino_nano_rp2040_connect_wifi

1 file changed

+2
-2
lines changed

Arduino_Nano_RP2040_Connect/arduino_nano_rp2040_connect_wifi/code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
print("MAC addr:", [hex(i) for i in esp.MAC_address])
4747

4848
for ap in esp.scan_networks():
49-
print("\t%s\t\tRSSI: %d" % (str(ap['ssid'], 'utf-8'), ap['rssi']))
49+
print("\t%s\t\tRSSI: %d" % (str(ap.ssid, 'utf-8'), ap.rssi))
5050

5151
print("Connecting to AP...")
5252
while not esp.is_connected:
@@ -55,7 +55,7 @@
5555
except RuntimeError as e:
5656
print("could not connect to AP, retrying: ", e)
5757
continue
58-
print("Connected to", str(esp.ssid, "utf-8"), "\tRSSI:", esp.rssi)
58+
print("Connected to", str(esp.ap_info.ssid, "utf-8"), "\tRSSI:", esp.ap_info.rssi)
5959
print("My IP address is", esp.pretty_ip(esp.ip_address))
6060

6161
print(

0 commit comments

Comments
 (0)