ESP-IDF and beyond: Lua with NodeMCU, Pycom's MicroPython fork and Adafruit's CircuitPython

Foundation

ESP-IDF

The Espressif IoT Development Framework (ESP-IDF) is the official development framework for the ESP32 chip.

https://docs.espressif.com/projects/esp-idf/

Lua

NodeMCU

An open-source firmware and development kit that helps you to prototype your IOT product within a few Lua script lines.

NodeMcu -- An open-source firmware based on ESP8266 wifi-soc.

Documentation: https://nodemcu.readthedocs.io/

MicroPython

MicroPython by Pycom

CircuitPython by Adafruit

https://github.com/adafruit/circuitpython

MCU support (Ports)

Side-by-side

Notable differences

While all forks will support these architectures …

  • bare-arm
  • cc3200
  • esp32
  • esp8266
  • minimal
  • nrf
  • pic16bit
  • qemu-arm
  • stm32
  • teensy
  • unix
  • windows
  • zephyr

… CircuitPython will also support Atmel SAMD:

The current stable version [of CircuitPython] is 2.3.1 with support for the Microchip Technology Atmel SAMD21 processor and the ESP8266 microcontroller. Adafruit has announced a major revision, 3.0.0, in alpha with support for the SAMD51 series processor.

CircuitPython availability for SAMD
atmel-samd Port for CircuitPython

1 Like

Thanks for pointing this out to me, @clemens! If you will get in touch with it, i would like to hear about your experiences.

I’m testing some Python snippets for the BeagleBone right now (and my Python knowledge is a beginer level). So it could be interesting to have a single code base for Linux and microcontroller in the future. Perhaps this will by a dialect of Python and not C/C++. But I have too less knowledge to estimate if this is feasible in the near future with the current python frameworks, the target MC and necessary sensors and the existing (Python-)frameworks.

We will – beside the "discrete" Data like temperature, weight, … – also use audio as data source on microcontrollers (!). So my feeling is right now that we can look at and use a broader code base when we count on C/C++. But just a feeling not really evaluated.

From the hardware side the PyCom family is interesting for us and the NB-IoT and LoRa part is interesting. you mentioned the Audio part of NodeMCU as interesting. So we have to see if we can get all in one bag.

A small correction here: The audio support is implemented by the Espressif Audio Development Framework (ESP-ADF), see also Audio acquisition with Espressif ESP32 WROOM and WROVER modules.

This functionality probably hasn’t been ported to any of the more highlevel runtime environments like NodeMCU or MicroPython yet. Instead, it is part of the foundational SDK libraries offered by Espressif, where Arduino Core, NodeMCU or MicroPython/CircuitPython are all sitting on top.

State of the onion for CircuitPython

To get up to speed with the current development of MicroPython board support for their most recent family of devices within Adafruit and their CircuitPython fork, we encourage you to read into the following canonical resources.

News

By Scott Shawcroft, the CircuitPython project lead.

Resources

Quotes

Bottom line

So, we have to adjust our perspective a bit: While we thought Adafruit would make Blinka work on all devices spanning the whole device family from M0/M4 over SBCs like the RaspberryPi and the ESP32, we have to state now that Adafruit CircuitPython is no thing for the ESP32 (yet).

So true.

The list of supported boards is published at CircuitPython Essentials | CircuitPython Essentials | Adafruit Learning System.

Moar CircuitPython ecosystem

The “Blinka” compatibility library

Blinka is a MicroPython compatibility layer intended to provide a CircuitPython-like API for devices which are running CPython or MicroPython.

The MU Editor

Adafruit is favouring the MU editor.

Mu is a Python code editor for beginner programmers based on extensive feedback given by teachers and learners.

https://codewith.mu/

Outlook