This is an old revision of the document!
Table of Contents
Micro Python
Introduction
Please check the bottom of this page for code examples.
MicroPython is a tiny, efficient version of Python designed to run on microcontrollers like the Raspberry Pi Pico. If regular Python is a full toolbox, MicroPython is the compact, ultra‑portable version that still lets you build amazing things.
Here’s the essence of it:
What MicroPython actually is
MicroPython is:
- A lightweight Python interpreter
- Designed for small, low‑power devices
- Fast to start (boots in milliseconds)
- Able to control hardware directly (GPIO, I2C, SPI, PWM)
It gives you the power of Python, but trimmed down so it fits into devices with tiny memory and low CPU power.
Why MicroPython exists
Traditional Python needs:
- An operating system
- Lots of RAM
- A full CPU
Microcontrollers like the Pico have:
- No OS
- Kilobytes of RAM
- Very small processors
MicroPython bridges that gap by giving you a Python‑like experience on hardware that normally only runs C or assembly.
What you can do with MicroPython
This is where it gets fun. You can:
- Blink LEDs
- Read sesors
- Drive motors
- Control displays
- Build IoT devices
- Make robots
- Read buttons and switches
- Communicate over Wi‑Fi (Pico W)
Micro Python Examples
Here are some Micro Python programs for you to try. Please bear in mind that these examples will likely require you to build some basic hardware (A Pico with, LEDs or buttons etc) before you can test the Micro Python code itself. In the Projects Section, there will be files for building the project hardware, software and 3D print files for the casing etc.
Raspberry Pi Pico Simulator - Only use this to start if you don't have a Raspberry Pi Pico board.
These first three examples all use the onboard LED on the Raspberry Pi Pico.
From here we are using the GPIO pins on the Raspberry Pi Pico.
Making your Raspberry Pi Pico code run on boot.
Full Projects. Full Projects are where we have built some circuitry, written some Micro Python Code and 3D Modelled an enclosure/stand etc. Sections in here might exist in other areas of the wiki, but to tie them together, we will create a project and put all relevant information in there.

