5 ms·
MicroPython: Python for microcontrollers
- bootload 11y agoexplanation: ~ https://youtu.be/5LbgyDmRu9s https://youtu.be/5LbgyDmRu9s (9m40s)
- acqq 11y agoOr the PDF (the technical reasons for MicroPython): http://micropython.org/static/resources/pyconuk14-mpinternals.pdf http://micropython.org/static/resources/pyconuk14-mpinternal... The last Kickstarter campaign: https://www.kickstarter.com/projects/wipy/the-wipy-the-internet-of-things-taken-to-the-next/description https://www.kickstarter.com/projects/wipy/the-wipy-the-inter...
- maxerickson 11y agoA previous discussion: https://news.ycombinator.com/item?id=7840566 https://news.ycombinator.com/item?id=7840566
- bootload 11y agothx for adding this @maxerickson, excellent read. Best bits I found reading this post [0]: - inline assembler - written in C99 ANSI C - almost entire entire Py3 standard library. nb: The original post url has 404'd, a link with this title is found at: https://mail.python.org/pipermail/python-list/2014-June/685769.html https://mail.python.org/pipermail/python-list/2014-June/6857...
- deutronium 11y agoAlso there is eLua for MCUs - http://www.eluaproject.net/ http://www.eluaproject.net/
- kfihihc 11y agoNodeMCU, Lua based ESP8266 WiFi development Kit. It based on eLua. https://news.ycombinator.com/item?id=9563609 https://news.ycombinator.com/item?id=9563609
- userbinator 11y agoI personally wouldn't consider a 168MHz Cortex-M4 as "microcontroller" level performance - it's in the same range as a 100MHz Pentium, and the desktops machines of the time could certainly run Python code without much difficulty. Getting Python on something like an AVR or PIC18, that would be far more interesting...
- Zuph 11y agoProcessing power is only one part of the equation, though. These Cortex processors are significantly more constrained in RAM and storage than computers of 1995. Run Python on a 100MHz Pentium with 192 KiB of RAM, I'll be impressed.
- bdarnell 11y agoPython was ported to PalmOS, where it could run on a 16MHz CPU with 64KB of usable heap space: http://isr.uci.edu/projects/sensos/python/ http://isr.uci.edu/projects/sensos/python/
- pfalcon 11y agoThat's golden news! ("news" in a sense "new is well forgotten old"). I heard about bunch of previous small Python implementations, but never about that one. As a MicroPython contributor, I'd be proud to think of it as MicroPython's spiritual ancestor. It is even an 1.5.2 port, wouldn't think someone attempted to space-optimize CPython (MicroPython is developed from scratch, CPython3 hardly could be shrunk into that). For you reference, MicroPython can start up in as little as 2K of heap. Of course, one hardly can execute something more than a simple expression like "1+1" in that memory, but 2K also include memory required for interactive interpreter (and parsing into AST and compiling into bytecode).
- bootload 11y agoPalm OS3 indeed (1998). I didn't see Python on Nokia, PyS60 till 2005: - S60 https://en.wikipedia.org/wiki/Python_for_S60 https://en.wikipedia.org/wiki/Python_for_S60 - S60 http://www.onlamp.com/pub/a/python/2005/04/14/s60.html http://www.onlamp.com/pub/a/python/2005/04/14/s60.html - N73 https://rubayeet.wordpress.com/2009/01/30/installing-python-on-nokia-n73-phone/ https://rubayeet.wordpress.com/2009/01/30/installing-python-... I never did see any real usage aside from one of the flickr devs using an N75 to upload/query flickr via Python.
- jbuzbee 11y agoMicroPython has been ported to the esp8266: https://www.sparkfun.com/products/13252 https://www.sparkfun.com/products/13252 which is a wifi-ready microcontroller that can be found on eBay for a few bucks: https://github.com/micropython/micropython/tree/master/esp8266 https://github.com/micropython/micropython/tree/master/esp82...
- tdicola 11y agoIf anyone wants to try it out, I wrote up a guide on how to compile and install the MicroPython firmware for the ESP8266: https://learn.adafruit.com/building-and-running-micropython-on-the-esp8266 https://learn.adafruit.com/building-and-running-micropython-... Note that it's still very early in its development so it doesn't support all the functionality of other MicroPythong boards, but it does have enough implemented to start hacking around with it like blinking LEDs and connecting to internet services.
- robmccoll 11y agoAnyone know of a Python equivalent to Lua / LuaJIT or Duktape for JS? I just really like drop-in single source file scripting environments. This looks close.
- beagle3 11y agoThere's also http://www.tinypy.org/ http://www.tinypy.org/ which should be better known. It's not "for microcontrollers", but it is quite small - fits within 64k, mostly complete py2 language implementation, has a luaesque API and GC (that is, not reference counting).