Micro Python Brings Python to MCU Boards and Robots (Crowdfunding)

Micro Python is an implementation of the Python programming language, written from scratch and optimized to run on micro-controllers such as the ones based on ARM Cortex-M cores. Damien George, the developer, also designed the Micro Python board powered by STMicro STM32F405 Cortex M4 MCU for the purpose of running Micro Python.

Micro_Python_BoardEven though in this project, the star of the show is not the board itself, as Micro Python will run on other platform once it’s open source, let’s have a look at the hardware specifications:

  • MCU – STMicro STM32F405RG @ 168MHz with 1MB flash, 192KB RAM, and an FPU.
  • External storage – Micro SD slot
  • 30 general purpose I/O pins – 5 USARTs, 2SPIs, 2 I2C busses, 14 ADC pins, 2 DAC pins, 2CANs, and 4 servo ports with power.
  • Built-in USB interface
  • Misc – 4 LEDs, a user switch, a reset switch, a real-time clock, and a 3-axis accelerometer (MMA7660)
  • Dimensions – 33×40 mm

The USB interface acts both as a serial device (CDC VCP) and removable storage device (MSC) to respectively access the Python terminal & debugging, and copy Python scripts to the board. The USB port can also be used to flash Micro Python onto the micro-controller.

Micro Python will handle the low level talks to boot the board, run ./boot.py to configure USB and other low level parameters, and will look for and launch your main program located by default in ./src/main.py. All you need is a Windows, Mac or Linux computer, connect the board via USB, and copy your Python scripts to the board, which just looks like another USB flash drive from your computer point of view.

Here are some code snippets:

  • Blinking LEDs every second:
  • Reading accelerometer values:
  • Controlling servos:

Micro Python has the following key features:

  • Python 3.3 grammar and semantics. Libraries not all available.
  • Support for 32-bit ARM processors with the Thumb v2 instruction set, e.g. ARM Cortex-M.
  • Footprint:
    • Space-optimized binary compiled to Thumb v2 machine code: around 60KB
    • Size of all code, including FAT support, SD card, USB serial, USB mass storage, USB HID, Bluetooth, LCD, servo, timer: about 110KB.
    • RAM – “Hello World”: 4KB.
  • 4 types of code emitters – (compressed) byte code, native code, native code with native types, and inline assembler.

Damien George is taking the project to Kickstarter in order to complete the development of Micro Python, make it open source (MIT License), and fund mass production for the Micro Python board, which will also be Open Source Hardware. If you just want to support his development efforts, and get early access to the source code and updates, you can pledge 10 GBP (~$16 US). You’ll have to pledge 24 GBP (~$39 US) in order to receive Micro Python board as well, adding 4 GBP if you live outside the UK. There are also some other pledges with kits (Robotics, Wireless, etc…).  The project already reached its funding target, and delivery is expected in March 2014.

I’ve also discovered another Python implementation for MCU called PyMite (aka p14p, python-on-a-chip) via the Kickstarter FAQ. Damien explains Micro Python does not allocate heap memory for integer operations and method calls, and by doing so, reduces the risk of inducing a garbage collection cycle which would cause performance issues during critical code, e.g. interrupt subroutines.

6
Leave a Reply

avatar
6 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
WiPy Wi-Fi Board for IoT Runs MicroPython on Texas Instruments CC3200 (Crowdfunding)Crowdfunding Report for 2014 on CNX Software BlogMicro Python ARM Cortex M4 Board is Now Available for $45onebir Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
onebir
Guest
onebir

So this should work on Arduino Due eventually too?

onebir
Guest
onebir

@cnxsoft Now 2 porting pledges, but no details about which MCUs. Looking for that info I noticed the hardware is being open-sourced: http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers/posts/693195

trackback

[…] Micro Python is both a lightweight implementation of Python 3.4 programming language, and a board, aka pyBoard, based on STMicro STM32F4 ARM Cortex M4 micro-controller running Micro Python. The project had a successful Kickstarter campaign in 2013, and they’ve completed shipment of the perks to their backers last June. The company has now launched its own store, so let’s see the progress of the project. […]

trackback

[…] Micro Python […]

trackback

[…] produced. The latest board with WiPy, a small board powered by Texas Instruments CC3200, running MicroPython, and consuming less than 1mA in suspended mode with Wi-Fi […]