Jump to content
Electronics-Lab.com Community

Program Microcontroller with MicroPython RTL8722 port


MENG XI

Recommended Posts

Microcontrollers are known for its low power usage and limited resources thus often deemed unable to understand Python script as Python need interpretor to translate script into machine langauge and intepretor are usaully quite resource-consuming. However, MicroPython has arisen as a lean and efficiant Python 3 interpretor that can be run on ARM Cortex-M series microcontrollers.

 

Ameba RTL8722 is an ARM Cortex-M33 microcontroller that has dual-band WiFi and BLE 5.0, other than that it is fully capable of running MicroPython and controls WiFi using Python script. In addition, its requirement for developing platform is also quite minimal-- only needs a serial port terminal like Tera term. Here is an example of RTL8722 controlling WiFi using just a few lines of Python code on Tera Term,

 

from wireless import WLAN
wifi = WLAN(mode = WLAN.STA)
wifi.scan()

 

Right after the last line, you will be able to see the result printed on the Tera term almost immediately,

micropython-started-4.png

 

Hope this post give you some ideas of how easy it is to control microcontroller using MicroPython, stay tuned and happy coding!

Link to comment
Share on other sites

  • 4 months later...

  • 2 years later...
On 12/18/2020 at 12:41 PM, MENG XI said:

Microcontrollers are known for its low power usage and limited resources thus often deemed unable to understand Python script as Python need interpretor to translate script into machine langauge and intepretor are usaully quite resource-consuming. However, MicroPython has arisen as a lean and efficiant Python 3 interpretor that can be run on ARM Cortex-M series microcontrollers.

 

Ameba RTL8722 is an ARM Cortex-M33 microcontroller that has dual-band WiFi and BLE 5.0, other than that it is fully capable of running MicroPython and controls WiFi using Python script. In addition, its requirement for developing platform is also quite minimal-- only needs a serial port terminal like Tera term. Here is an example of RTL8722 controlling WiFi using just a few lines of Python code on Tera Term,

 

from wireless import WLAN
wifi = WLAN(mode = WLAN.STA)
wifi.scan()

 

Right after the last line, you will be able to see the result printed on the Tera term almost immediately,

micropython-started-4.png

 

Hope this post give you some ideas of how easy it is to control microcontroller using MicroPython, stay tuned and happy coding!

You should pay attention to books devoted to Tesla coils themselves, their operating principles, design and application. Look for literature that matches your level of knowledge and interests in electronics. I usually ask do my assignment if I need something, I use https://edubirdie.com/do-my-assignment for this. I don’t really like searching for a long time for a book or information in it. Also use the resources of online stores or libraries, this may help.

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