Hacker Timesnew | past | comments | ask | show | jobs | submitlogin
The Micro Python Project (github.com/micropython)
74 points by joshbaptiste on Jan 1, 2014 | hide | past | favorite | 12 comments


Other scripting language implementations for microcontrollers that I am aware of are mruby[1] and eLua[2]. eLua is the most mature, and also runs the core language pretty much unmodified, as Lua really is that small.

[1] https://github.com/mruby/mruby [2] http://www.eluaproject.net/


I vividly remember reading about the 8052AH-BASIC chip in "Ciarcia's Circuit Cellar" (Byte Magazine, August 1985). It was an 8 bit micro with an 8 kByte floating point BASIC. There was also a version with FORTH. These interpreters were codes that Intel gave away to illustrate what you could do with their chips.

Many years later, I bought a simplified version of the circuit and used it to run little production machines in a factory.


More information: micropython.org

This is Python for the STM32F405 microcontroller.

Good to see the source code and hardware source code (BoM, EAGLE files, etc).

This was a fairly successful Kickstarter (£97,803 pledged of £15,000 goal). No idea if the boards have shipped yet.

From a naive look at the source code, it seems like this would also run on other ARM boards quite happily - please correct me though!


A few more details:

Code will run on M3/M4 arm, like OP said.

Code has an optional compiler that uses integers instead of python objects and achieves NEAR C SPEED.

Uses GC with response time of 4 ms.

Basic compilation mode is optimized for memory consumption.

You can choose which compilation mode per function using decorators.

I believe this can run with chips costing around $3 or $4 at the low end, due to memory requirements.

It has an easy to use C api.

It can run on the netduino+(which is arduino shield compatible).

There's a REPL from the PC.


I pledged at a level that gets me one board. So far I don't think they have shipped. The author has documented that the first shippers will be hand soldered, which makes good sense, and I'm looking forward to mine.

Now, just to come up with a use for it. ;-)


Heh.. same here also a backer , yet have no direct use case at the moment. Though I also own two Raspberry Pi's and a Beaglebone black that are fun to play with, I guess I just like the fact that this is just Python without the overhead of a complete Operating system.


I'd describe it as a microcontroller breakout board with a built-in Python interpreter. I've also got Pi's, and make extensive use of lower level MCU breakout boards (e.g., 16 bit, programmed in C) for prototyping. It's easier to throw a micro at a problem than to coax a PC to work as a real time computer. And there usually has to be some kind of electronic interface anyway, so why not a micro?

The Python board will do a couple of things. First, by studying the design, I'll get a gentle introduction to a micro that's much more powerful than anything I've ever dealt with. I'll see what kind of code is needed to manage such a beast. Second, I'll learn the tradeoffs between a higher level language and C for embedded projects.


Damien George is one of the best hackers I know[0] - very excited to see the awesome work he's doing with Micro Python.

[0] - In 1999, from a visual inspection of my busted BP6 motherboard, he resoldered a few components - good as new.


Reading "BP6" felt like "Obi-Wan... Now, that's a name I've not heard in a long time. A long time."

http://archive.arstechnica.com/reviews/3q99/bp6/bp6-1.html


What I really want to see is dynamic method migration (to FPGAs) for Python.

http://scholar.google.com/scholar?cluster=154547636616849104...


What of the Python library ecosystem? Usable?


From the Kickstarter page:

Micro Python has the following features: Full implementation of the Python 3 grammar (but not yet all of Python's standard libraries).

Implements a lexer, parser, compiler, virtual machine and runtime.

Can execute files, and also has a command line interface (a read-evaluate-print-loop, or REPL).

Python code is compiled to a compressed byte code that runs on the built-in virtual machine.

.......

And a more exhaustive list on the page

http://www.kickstarter.com/projects/214379695/micro-python-p...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: