MICROPYTHON WITH THE ESP32 GUIDE SERIES
In this lesson, I will discuss MicroPython Resources that will save you time and help you to learn faster.
MicroPython is relatively new. Nevertheless, continuing that tradition set by Python is very well documented. In this lecture, I'll show you some of the best online, free, and community-supported resources that I use. I guarantee that these resources will save you time and help you take your first steps with MicroPython.
MicroPython.org is the home of the MicroPython language on the web; this is where you can find MicroPython firmware for the supported boards, links to the documentation, a discussion forum, and a store from where you can purchase "Pi" boards. I have prepared a separate lesson where I discuss supported hardware, so hold on to any hardware-related questions for now.
In this course, we'll spend a lot of time browsing the documentation, and I'll talk about that shortly. I encourage you to sign up for an account for the MicroPython forum, where you can participate in relevant discussions. The forums, including the one dedicated to the ESP32, are very busy with multiple new discussion threads almost daily.
We'll be spending a lot of time browsing through the MicroPython documentation. The documentation website is hosted under docs.micropython.org. It contains details about the MicroPython libraries, the language, and implementation. In almost every case, the documentation provides a detailed definition of every function and class and simple examples of how to use it. The documentation covers the Python standard libraries and MicroPython specific libraries and libraries specific to the "Pi" board, WiPy, ESP8266, and ESP32 boards.
MicroPython language reference
The MicroPython documentation focuses on topics specific to MicroPython. Because the MicroPython syntax, language, and programming philosophy comes from Python, you'll need to refer to the Python documentation from time to time.
For example, if you don't remember how to initialize a table, you can quickly look it up in the Python Documentation. You'll find this at docs.python.org/3 and then click on the Language Reference link.
Python Package Index
MicroPython, as with Python, has a substantial library of packages created by its community of programmers.
A repository where you can find many of those packages is the Python Package Index at pypi.org. The Python Package Index contains packages designed for CPython and MicroPython.
You need to be a little careful when you search. Often packages written in MicroPython indicate that in the title.
For example, You can find a MicroPython package for the DHT12 sensor by searching for MicroPython DHT12 to distinguish it from other packages written for different platforms. One of them is PI GPIO, a Python package that works on the Raspberry Pi computer.
Of course, even when you find a package that explicitly indicates it is written for MicroPython, you need to check that it supports your hardware target. Not all of them do.
Awesome-MicroPython is a curated list of libraries for MicroPython specifically, that's unlike the Python Package Index.
In most cases, when I'm hunting for a MicroPython library, I go to Awesome MicroPython first. The curated list contains libraries grouped according to their purpose. You'll find libraries for Ethernet and MQTT communications, displays like E-Paper and LCD; there's GPIO and input/output libraries, all kinds of sensors, schedulers, storage, and much more.
But as with the Python Package Index, once you find a library that looks promising, you need to take a closer look and ensure that it will work with your microcontroller of choice. This information is not always readily available in the library's documentation. In many cases, you'll have to download the library and test it on your device to make sure that it's compatible with it.
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