que-es-micropython

What is MicroPython

  • 4 min

First introductory entry to the MicroPython Course, where we will see what it is and what the characteristics of this language for embedded systems are.

There is no doubt that Python is one of the most popular programming languages at the moment. Its simplicity and its “readability first” philosophy have made it one of the most used and loved languages by many.

Well, MicroPython is a lightweight and efficient implementation of the Python 3 programming language, designed specifically to run on microcontrollers and embedded systems.

It was created by Damien George in 2013, with the aim of bringing the simplicity and power of Python to small, low-cost devices.

That is to say, unlike standard Python (which runs on general-purpose computers), MicroPython is optimized for devices with limited RAM and processing power.

Let’s look at some of its main features.

  • Complete Python 3 language: Supports most of the features of Python 3 (syntax, data types, functions, and modules)
  • Optimization for limited resources: Designed to run on devices with few resources.
  • Interactivity through REPL: Allows you to execute Python code directly on the device from the PC.
  • Hardware-specific libraries: Includes built-in modules to interact with hardware (such as GPIO, PWM, I2C, SPI, and UART).

Advantages and disadvantages of MicroPython

MicroPython has a good handful of advantages that make it suitable for a wide range of projects. The main ones are,

But not everything could be wonderful (it couldn’t be). Like everything, it also has some disadvantages,

  • Efficiency and consumption: Putting a Python interpreter on a microcontroller is overkill. Don’t expect great performance.
  • Lack of libraries: You may not have all the hardware and libraries that you have, for example, in Arduino (c++).

Hardware compatible with MicroPython

Very nice, but where can I run MicroPython? The good news is that MicroPython is compatible with a wide range of microcontrollers and development boards.

Some of the most popular include:

MicrocontrollerDescription
ESP32A microcontroller with integrated Wi-Fi and Bluetooth, ideal for IoT applications ❤️❤️.
ESP8266Similar to the ESP32, but with fewer resources and more economical.
Raspberry Pi PicoA development board based on the RP2040 microcontroller, specifically designed for MicroPython.
STM32A family of high-performance microcontrollers compatible with MicroPython.

Where to use MicroPython

I suppose that’s the million-dollar question. Where can I use MicroPython? Short answer, wherever you want.

Long answer, MicroPython fits into various applications. For example, it can be an excellent tool for teaching programming and electronics, as it combines the simplicity of Python with the ability to interact with hardware.

It can also be very useful for doing a rapid prototype or a one-off project (that is not very demanding in terms of resources). For example, it fits into certain Internet of Things projects, automation, and even robotics.

Personally, I don’t think I would put it in a commercial product, with a long production run (there I would prefer C++ or Rust, surely). But of course, these projects are quite niche.

In any case, it is an interesting tool to use. So let’s start exploring it in the following tutorials.


And if sooner or later, you want to learn more about Python, here is a link to the course (I have a course on Pyyyythooon). Right here 👇

Make sure to click and like 👍