Have you wondered how many WiFi are there in your surroundings? What are they? Any free network I might connect to? Using MicroPython on Realtek Ameba RTL8722DM, you can do it in just 1 line of Python code, here is how,
Materials
Steps
WiFi Scan function can help us quickly discover what WiFi networks are available in our surrounding. This example does not require any additional hardware, thus simply copy, and paste the following code into REPL to see its effect.
#The long version
from wireless import WLAN
wifi = WLAN(mode = WLAN.STA)
wifi.scan()
# The short version
WLAN(WLAN.STA).scan()
Materials
- Ameba x 1
Steps
WiFi Scan function can help us quickly discover what WiFi networks are available in our surrounding. This example does not require any additional hardware, thus simply copy, and paste the following code into REPL to see its effect.
#The long version
from wireless import WLAN
wifi = WLAN(mode = WLAN.STA)
wifi.scan()
# The short version
WLAN(WLAN.STA).scan()