Friday, June 17, 2016

Embedded Python

In a previous post on Python, "why I like Python", I discussed how I am really liking Python.  For years I did very little with Python because all our scripts were Perl or shell.  My teams were comfortable with Perl when they needed to write complex scripts.  However, we now are refreshing technology and Python is an excellent choice.

A few years ago I read about the ESP 8266 wifi module.  This $2US module is great for adding wifi to Arduino systems via a serial interface.  Last fall, I saw an article about a really cool new ESP 8266
module, the NodeMCU.  However, the NodeMCU comes with the language Lua installed which is a yet another scripting language.  Then I found MicroPython!

 MicroPython allows Python3 to run on bare metal!  This means that the system comes up with the Python REPL (Read Evaluate Print Loop) interface -- a Python prompt.  You can program the NodeMCU (or other device) via a USB interface using a terminal program like Picocom, or via a simple web-based program WebREPL.  Note that WebREPL also allows one to write Python scripts or other files directly to a virtual disk on the device.

Boards that can run  MicroPython are available from:

For the NodeMCU, the documentation can be found at MicroPython on the ESP8266

I will post more here after I play with my NodeMCU a bit more!

Happy Hacking!

No comments:

Post a Comment