MICROPYTHON WITH THE ESP32 GUIDE SERIES
MicroPython Compatible Boards
In this lesson, I will discuss some of the microcontroller boards that are compatible with MicroPython. As you'll see, there's a huge variety to choose from.
When MicroPython was first published in 2014, only one board supported it, the original pyboard. A few years later, there's MicroPython support for a wide range of microcontrollers, including the ESP32, which is the one that we'll be using in this course.
In this lesson, we'll take a closer look at the boards that can use MicroPython.
Let's start with the original pyboard. The pyboard 1 is the board that Damien George designed to run MicroPython for his Kickstarter project in 2014. The pyboard contains an STM32 microcontroller chip, which is based on an Cortex-M4CPU. It has 1024 kilobytes of flash ROM and 192 kilobytes of RAM. It also features a micro SD card slot for an expanded file system, and accelerometer, real time clock, four programable LEDS, 29 GPIOs, and two digital to analog converters among other things.
The new D-series pyboard also uses an STM32 microcontroller, but has a deep style form factor that makes it easier to integrate into projects. Got more flash and RAM capability for external flash, as well as Wi-Fi and Bluetooth connectivity, and improvements across the board. The pyboard is the golden standard for what a MicroPython device looks like.
ESP32 and ESP8266
Then, of course, we have the Espressif, ESP, family of devices, the ESP32 and the older ESP8266 are almost fully supported by MicroPython. You have learned about the lack of Bluetooth support, for example, for the ESP32 in the previous lecture. The ESP32 specific libraries are documented on the main MicroPython documentation website.
Next to the pyboard, the ESP32 and ESP8266 seem to have the widest range of community contributed Micropython libraries. This means that there is a good chance that you'll be able to find a device driver for your favorite display or sensor. At the time I'm writing this, a Bluetooth is not supported and this is because of how much memory this implementation would require. Wi-Fi, however, as you probably already know, is fully functional.
So, apart from Bluetooth, almost all of the end user features on the ESP32 can be used in MicroPython, timers, GPIOs, PWM, Wi-Fi, I2C, SPI, sleep, analog to digital converters, all of those work. It's even possible to read the internal whole temperature sensors.
The ESP32 is the microcontroller that I've chosen to use in this course because of the excellent MicroPython implementation, the richness of its hardware, and my familiarity with it from previous projects.
Raspberry Pi Pico
Now, let's have a look at the Raspberry Pi Pico. The Raspberry Pi Pico was released earlier in 2021 selling for around $5. And it's powered by the brand new RP2040 microcontroller. This microcontroller was designed by the Raspberry Pi Foundation. And very quickly, several new boards came out that are based on the same microcontroller, like the Feather 2040, the Tiny 2040. All of them can run the MicroPython firmware. And the Raspberry Pi Foundation provides excellent documentation through its website.
I find that compared to the pyboard and the ESP boards, it is much harder to find MicroPython device drivers for the Raspberry Pi Pico. It's still a new board, so I expect that this is going to change.
The Raspberry Pi Pico is an excellent, simple board. It doesn't have any wireless communications capability, but I think that this is a case where simplicity is an advantage. Along with the BBC micro:bit, the Raspberry Pi Pico is probably the easiest way to learn MicroPython.
Next up, the BBC micro:bit. So, the BBC micro:bit is a small board designed specifically for education.
It uses a Nordic nRF52833 application processor. And it contains an impressive array of built-in peripherals, such as an LED matrix display, a touch sensor, a microphone, a couple of buttons, and an accelerometer.
It also has a 2.4 gigahertz transceiver that students can experiment with and create a simple radio communications protocol and get microbits to talk to each other wirelessly.
The MicroPython implementation on the micro:bit is excellent as expected. I've tested many of its hardware components and everything seems to be working, even the radio communications.
Next up, we've got the STM32 boards.
The Texas Instruments' Nucleo and Discovery boards and the Espruino Pico are based on the microcontrollers from the same STM32 family. I remind you that the pyboard also uses an STM32 microcontroller unit.
There are several Nucleo and Discovery boards geared towards rapid prototype development for engineers, but are also used in education. The Espruino Pico is a particularly popular board among makers because of how much power is packed in such a tiny board.
On the MicroPython website, it's mentioned that the STM32 line of microcontrollers from STM Microelectronics are officially supported by MicroPython via the STM32Cube HAL libraries. The STM32 port of MicroPython contains the source code for these MCUs.
This was just a short list of some examples of the boards that can work with MicroPython. In this course, we'll experiment with the ESP32, as you know.
Learn MicroPython for the ESP32
With this video course, you will learn how to use the
MicroPython programming language with the ESP32 micro-controller.
MicroPython is the perfect language for anyone looking for the easiest (yet still powerful) way to program a micro-controller.
Jump to another article
1. What is MicroPython?
2. MicroPython vs Python
3. MicroPython resources
4. MicroPython compatible boards
5. Getting started with Thonny IDE
6. How to install the MicroPython firmware
7. Setup an interpreter in Thonny IDE
8. How to write and execute a MicroPython program
9. Thonny IDE with the Raspberry Pi Pico
10. Thonny IDE with the BBC Micro:bit
11. Thonny IDE advanced configuration
12. How to find MicroPython packages at PyPi
13. The MicroPython shell
14. MicroPython Programming with files
15. How to interrupt a running program
16. How to run a program at boot
17. How to debug MicroPython program