.st0{fill:#FFFFFF;}

ESP32

MicroPython with the ESP32, our new course 

 April 23, 2021

By  Peter

I’m excited to announce that we have just published our new course, MicroPython with the ESP32.

We’ve been working on the production side of this course since the beginning of February, and research started in mid-2020.

The course is titled “MicroPython with the ESP32“.

With this course, you will learn how to use the MicroPython programming language with the ESP32 microcontroller.

This course is for anyone looking for the easiest (yet still powerful) way to program a micro-controller.

Once you learn the basics of MicroPython, you can use your skills across multiple hardware targets, such as the Raspberry Pi Pico, BBC Micro:bit, the WiPy and STM32 Nucleo and Discovery boards.



What is MicroPython?

Here is a description of the language from the MicroPython website (emphasis in bold is mine):

“MicroPython is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments.”

Because MicroPython contains the word “Python”, it is easy to become confused and think that MicroPython is simply a smaller version of Python.

It is the same confusion that I have seen in the past between Java and Javascript.

While Python and MicroPython have a similar name, they are totally different languages, with a different set of goals and implementation.

I talk more about the differences between Python and MicroPython in a later lecture. For now, I just want to make sure that you are not confused by the similarity in the name.

Excellent for learning and using

What MicroPython has taken from Python is the language architecture, its programming philosophy for code readability, and a huge pool of programmers that already know how to use Python.

Pythonistas can quickly become MicroPythonistas and write programs for microcontrollers.

According to the “PYPL PopularitY of Programming Language Index”, Python is the most popular programming language in the world, with a 30% share. This index is calculated based on the amount of searching is done on Google for programming language tutorials or resources.

As a comparison, C/C++ used by the Arduino boards ranks 5th place in this index.

This popularity translates to a Python universe that is filled with all the documentation, libraries and community support you will ever need.

MicroPython is as easy as Python to learn, and follows Python’s tradition for excellent development tools and documentation. In this course, you will see me constantly browsing through the MicroPython core documentation, as well as many of the excellent libraries we’ll be using.

In terms of tools, you have many choices. In this course, I’ll be using Thonny. But, you can also choose tools such as upycraft, and the Mu editor.

What I really like about Thonny is that is a full Python editor on its own merit, with excellent debugging tools, but also fully supports MicroPython on the ESP32 as well as other target boards like the Raspberry Pi Pico and the BBC Microbit.

Another big advantage of MicroPython is that once you learn it, you can use your skills across multiple hardware targets. At the time I am recording this lecture, MicroPython has support for the original Myboard v1 and D-series, as well as third-party boards such as the STM32 Nucleo and Discovery boards, the Espruino Pico, the Raspberry Pi Pico, the WiPy, the ESP8266 and ESP32, the TinyPico, and the BBC Micro:Bit.

This was just a partial list.

What will you learn in this course?

This course will:

  1. Introduce you to the MicroPython programming language on the ESP32. There are also lectures where I demonstrate MicroPython projects with the Raspberry Pi Pico and BBC Micro:bit.
  2. Help you learn how to use MicroPython with common external devices like sensor, motors and displays.
  3. Consolidate this knowledge with the help of two cap-stone projects.

Who is this course for?

This course is for anyone looking for the easiest (yet still powerful) way to program a micro-controller.

Familiarity with Python is not necessary – with this course you will learn everything you need.

If you already know Python, then this course will help you get started with MicroPython and use it to program the ESP32.

Ideally, you have a basic understanding of electronics, and are familiar with the Arduino platform. If you are not, I recommend to complete Arduino Step by Step Getting Started first.

How is this course organised?

This course is organised in four parts.

In the first part, you will learn the basics. This is where you’ll learn how to setup and use Thonny, our programming editor, and prepare your ESP32 to work with MicroPython.

You will also have the opportunity to learn the basics of MicroPython and where and how to find compatible libraries.

The second part is where you roll up your sleeves and write MicroPython programs. You’ll start with simple pin operations that make LEDs blink and read buttons, then move on to sensors, displays, and motors. There’s a large section dedicated to Wifi and Internet of Things applications, and another section dedicated to move advanced topics such as hardware timers, working with internal sensors, and sleep.

In the third part, you will consolidate your new knowledge with the help of two capstone projects. Both projects combine the same hardware components with one big difference in the software. While in the first project, all of the MicroPython code exists in the same file, in the second project I show you how to modularise the design and break up the code in two files.

In the fourth and final section, I wanted to give you a taste of what MicroPython looks like on two other microcontrollers: the Raspberry Pi Pico and the BBC Micro:Bit. This why you will see first hand how easy it is to use your knowledge of MicroPython programming across different microcontrollers even though they belong to different hardware architectures.

What software and hardware will you need?

Not much at all. All the software is free, and you probably have all the hardware you will need.

In summary:

  • For the software, you will the Thonny programming tool, and the MicroPython firmware for the ESP32. Both are open-source and free
  • For the hardware, you will need an ESP32 board, and an assortment of common components like LEDs, resistors, sensors and motors. It doesn’t matter which ESP32 board you have. As long as it is an ESP32, it will work with MicroPython.

Here’s a detailed listing of the requires software and hardware.

Get it now

What to learn more about this course?

See more details, including the complete curriculum and enrollment options.


Tags

MicroPython


You may also like

Makers talk recording: WIZcube

Makers talk recording: WIZcube
{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}