Skip to content
Paul Sokolovsky edited this page May 6, 2015 · 53 revisions

Welcome to the micropython dev wiki! This is the MicroPython project, which puts an implementation of Python 3.x on a microcontroller or embedded system. The project also includes a small microcontroller board based around the ARM Cortex-M4 chip (STM32F405RG).

This wiki is to support development of the MicroPython core code and the various ports to new hardware/systems. The users guide on how to use MicroPython, and all user oriented library and module information, is on the main Micro Python site.

micropython-logo

###What is MicroPython MicroPython is a Python interpreter (with partial native code compilation feature). It provides subset of Python 3.4 features, implemented for embedded processors and constrained systems.

###Boards The Kickstarter board (Pyboard)

  • The board relies on a 32 bit ARM Cortex M4 CPU (STM32F405RG, DSP with FPU, 1Mbyte Flash, 128+64 Kbyte RAM, 168 MHz).
  • Technical data on the chip can be found here: STMicroelectronics website and the datasheet can be found here: datasheet

A list of other boards and their ports is here: Other Boards

I want to try using MicroPython now!

If you have a machine that runs some flavor of Unix, see the Getting-Started instructions on how to obtain the binary to run MicroPython and start developing. MicroPython can also built on MacOSX and Windows.

You can also testdrive a Pyboard over Internet: http://micropython.org/live/ !

Documentation

  • For introduction and tutorials on using MicroPython on Pyboard follow links on http://micropython.org/
  • Official documentation is at http://docs.micropython.org
  • MicroPython is an implementation of (subset of) Python language, so "Tutorial" and "Language Reference" sections of https://docs.python.org/3.4/ apply. (Note: only few, core library modules are provided with MicroPython, few more may be available as user-installable modules, so "Library Reference" applies only partially).
  • Ongoing effort to document Differences between CPython and MicroPython.

The pyb module

This module allows access to the internal peripherals of the microcontroller chip. Initially, the 405RG chip noted above is supported. Support for more microcontrollers may be added in future releases. Documentation: http://docs.micropython.org/en/latest/library/pyb.html

Development

Performance

Some numbers from a very simple benchmark

Tips and Tricks / Howtos

How to perform a soft reset

Current Limitations

  • The entire set of standard python libraries is not supported. If a module is missing it will be due to the inapplicability of that module for use in an embedded controller. High memory consumption (e.g. sqlite3) or a lack of a certain required hardware feature (e.g. multiprocessing) are reasons that some modules can not be implemented for some microcontrollers. The full list list of standard python libraries can be found here: Python 3.4 standard lib.
  • There are differences between CPython3 (considered to be a reference implementation of the Python3 language) and MicroPython. Documented here.
Clone this wiki locally