Daily tips and tricks from the experts at Adafruit!
View this email in your browser

Christopher Hiller made a great blog post last month about the journey from web development to hardware with Arduino and MicroPython.  This is a good post that summarizes a current state of the world with MicroPython ports, and in particular Christopher’s interest in the ESP32 port of MicroPython.  From the post:

After the success of the original campaign (which eventually allowed its creator, Damien George, to work on MicroPython full-time), Mr. George launched another in early 2016, targeting our revered ESP8266. This well-timed campaign succeeded, despite the “reward” being little more than open-source software!

By the time it landed, many hackers already had ESP8266 boards in their clutches. Now that the first port of the framework was public, it was just a matter of time before the community extended MicroPython support to other platforms:

  • Adafruit ported it to Atmel’s ARM Cortex-M0+-based SAM D processors by way of a fork
  • The Micro:bit Educational Foundation (presumably) ported to the BBC micro:bit, which runs Nordic’s popular nRF51822 SoC for BLE
  • Pretty much my favorite: PyCom helped develop a port for Espressif’s newer SoC, the ESP32
  • A few others I’m unfamiliar with (please comment if you’ve used them!)

MicroPython works well on ESP8266-based boards, as they are reasonably speedy at 80MHz. However, the ESP8266 has only 160KiB of SRAM, less 64KiB for the bootloader, less MicroPython’s own overhead. You’re really going to be squeezed here. Speaking from experience, it’s easy to run out of memory via object allocation, resources left open, or even too many lines of code—via import statements or otherwise!

While ESP8266-based dev boards are cheap and plentiful (a good one can be purchased direct from China for under $3 USD), for a few dollars more—under $7 USD—you can get your meathooks on an ESP32-based board.

This is important because the ESP32 runs MicroPython like a boss.

Be sure to follow Christopher’s blog for future updates on his MicroPython projects.

In other news be sure to check out the latest CircuitPython 2.2 RC1 release.  This adds a few bug fixes and improved microphone support to enable recording audio samples.  If you missed it too, be sure to check out the excellent new Welcome to CircuitPython guide too!