Jump to content
Electronics-Lab.com Community

How many WiFi are there is my neigborhood? 1 line code tells you just that! --Ameba MicroPython


MENG XI

Recommended Posts

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

  • 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()
 
Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...