Jump to content
Electronics-Lab.com Community

Connecting a microcontroller to WiFi is never so easy with Python -- Ameba MicroPython


MENG XI

Recommended Posts

For an IoT development board, the tricky part is connecting to other wireless devices, for example wifi router or bluetooth sensor, now with MicroPython, you can connect to any wifi device with only few line of code typed in real time, no compilation is needed! Check out how ameba RTL8722DM does that as follows,

 

 

Materials

  • Ameba x 1

Steps

Ameba can connect to WiFi access point with open security or WPA2 security type, which is the most common security type used in household wireless routers. Here we are going to connect to a WiFi access point using code below, copy and paste the following code line by line into REPL to see their effects.

 
from wireless import WLAN
wifi = WLAN(mode = WLAN.STA)
wifi.connect(ssid = "YourWiFiName", pswd = "YourWiFiPassword")
Link to comment
Share on other sites

  • MENG XI changed the title to Connecting a microcontroller to WiFi is never so easy with Python -- Ameba MicroPython

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...