que-es-micropython

What is MicroPython

  • 4 min

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

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

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

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

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

Let’s look at some of its main characteristics.

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

Advantages and Disadvantages of MicroPython

MicroPython has a good handful of advantages, making it suitable for a wide range of projects.

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

The main ones are,

  • Ease of use: Thanks to its syntax, it is very accessible for beginners (and also for experts).
  • Rapid prototyping: Allows developers to build and test ideas quickly, speeding up the development process.
  • Active community: The MicroPython community is very active, so you have a wealth of resources, forums, and project examples.
  • Efficiency and consumption: Putting a Python interpreter on a microcontroller is overkill. Don’t expect great performance.
  • Lack of libraries: You might not have all the hardware and libraries 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 the million-dollar question. Where can I use MicroPython? Short answer, wherever you want.

Long answer, MicroPython fits into different 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 making a quick prototype or a one-off project (that is not very demanding in terms of resources). For example, it fits in certain Internet of Things, automation, and even robotics projects.

Personally, I wouldn’t put it in a commercial product, with a long production run (there I would probably prefer C++ or Rust). But of course, these projects are a minority.

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


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

Learn the basics of programming with the Python course

Click here and hit the like 👍