MicroPython is stellar. If you're building an embedded system for people to hack and customize, make the highest level abstraction of the embedded system in MicroPython so that users can easily modify/patch/contribute/hack your system with ease.<p>This is what Arduino and Arduino IDE did for millions of hobbyist, but it is time to ditch C/C++ for MicroPython.<p>In this [1] PyCon talk by Matt Trentini, a demo of QR code generation proves that with plain C and with MicroPython bindings, the performance is identical - 11.5ms. MicroPython <i>is</i> slow, and if the QR code library was written in pure MicroPython, it would take 1500ms. Therefore, it is critical to put performance demanding code in C/C++ modules and compile a MicroPython bindings.<p>I think this is one of the best things that's happened to embedded development in a long time. Lua is nice but IMO Python is even better :)<p>There is also Async IO library support for MicroPython. So ISRs can trigger coroutines!<p>[1] <a href="https://www.youtube.com/watch?v=437CZBnK8vI" rel="nofollow">https://www.youtube.com/watch?v=437CZBnK8vI</a>
If curious see also<p>2014 <a href="https://news.ycombinator.com/item?id=7840566" rel="nofollow">https://news.ycombinator.com/item?id=7840566</a><p>also 2014 <a href="https://news.ycombinator.com/item?id=6996692" rel="nofollow">https://news.ycombinator.com/item?id=6996692</a><p>2015 <a href="https://news.ycombinator.com/item?id=9558969" rel="nofollow">https://news.ycombinator.com/item?id=9558969</a><p>2016 <a href="https://news.ycombinator.com/item?id=11181158" rel="nofollow">https://news.ycombinator.com/item?id=11181158</a><p>Many submissions but those seem to be the interesting threads.
MicroPython seems to be heavily focused on embedded <i>systems</i>.<p>Is there any support for embedding it within an <i>application</i>, i.e. as a replacement for Lua? Or is there another lightweight Python implementation (or Python-like language) that supports this?
There also exists a Python-like language for when you only have a few kb of memory, and can’t even run MicroPython. It’s called “Snek”:<p><a href="https://sneklang.org/" rel="nofollow">https://sneklang.org/</a>
MaixPy ported Micropython to K210 (a 64-bit dual-core RISC-V CPU with hardware FPU, FFT, sha256 and convolution accelerator).
It includes a general-purpose neural network processor, which can do convolutional neural network calculation at low power consumption, for example obtain the size, coordinates and types of detected objects or detect and classify faces and objects. It can load TensorFlow Light Neural Nets.<p><a href="https://maixpy.sipeed.com/en/" rel="nofollow">https://maixpy.sipeed.com/en/</a>
I once built a METAR light map like this - <a href="https://slingtsi.rueker.com/making-a-led-powered-metar-map-for-your-wall/" rel="nofollow">https://slingtsi.rueker.com/making-a-led-powered-metar-map-f...</a><p>However, I did it with an ESP8266 running MicroPython; I was impressed that such a small, cheap little computer was able to connect to the internet, retrieve XML, parse it (this step in particular), and update the state of each of the WS8211 lights with ease, all with some quick, easy-to-write Python.
I think this is good for someone getting started with microcontrollers(similar to the Arduino)<p>However, one should not be disillusioned — I doubt this can be used to deploy a mass market product.<p>However, I can see micro-python’s value in rapid-prototyping to some extent for someone who is not into embedded/firmware as much.
MicroPython is amazing, it runs on very tiny microcontrollers not much else runs on, and makes development of hobbyist embedded projects orders of magnitude easier than C.<p>I backed it way back when, I think for the ESP8266 support, and have loved it ever since.
Does anyone have any experience beyond short programs/sketches with micropython? The most I've used it for is playing around with a microbit. How does it hold up?
Neat, but not very practical. To be of any use you still need board support to drive the I2C, SPI, etc which means you have to use C anyhow.<p>You can buy one of their boards with the BSP but that's over $40, yikes.<p>To use micropython you need at least an M4 class micro-controller so that a $5 or greater part.<p>Or you could just stick with C and use a M0 class micro that costs < $1.<p>A difference of $40 in BOM cost makes it only applicable to the hobbyist. Which is fine, but its just a toy.
> <i>MicroPython implements the entire Python 3.4 syntax</i><p>Python 3.4 is now over 6 years old. Are there plans to add features from newer Python releases? Or perhaps the developers feel that Python's newer features wouldn't "pull their weight"?
In my experience, one should understand the c dependencies to use micro/circuit python for most of desired uses. Still great stuff. The mere decrease in linecount for simple algs has real value.
The coolest application of Python on uCs that I've seen recently is in the custom mechanical keyboard space:<p><a href="https://github.com/makerdiary/python-keyboard" rel="nofollow">https://github.com/makerdiary/python-keyboard</a><p>I'm loving the thought of being able to customize my keyboard's functions by just dropping python files onto its USB drive. Looking forward to using this on my Dactyl-CC build.
Check out uiflow from M5Stack. It is a web-IDE which uses micropython for ESP32. You can use the M5stack grove sensors. The IDE generates python code which can be used on any MicroPython Implementation (ESP8266, EPS32, Raspi, CircuitPython, Micro:Bit, you name it) and the python libs are all open source.<p><a href="https://flow.m5stack.com/" rel="nofollow">https://flow.m5stack.com/</a>
I'm more familiar with CircuitPython because I've bought a few boards that could run it, though I've stuck with Arduino so far. It seems to be a fork started by AdaFruit, but it looks like there are other vendor boards it works on like SparkFun, Teensy, and Arduino.<p>What boards work with MicroPython? On their website, they only list their own?
Remarkably, it has recently gained (still not mainlined) 68000 support: <a href="https://twitter.com/micko_mame/status/1256221039308267520" rel="nofollow">https://twitter.com/micko_mame/status/1256221039308267520</a>
I've done quite a few firmware development projects (they're commercial type and deployed in fitness industry, police vehicles, etc). They type of thing they do, I have a hard time imagining doing it in Python.
I've been doing microprocessor stuff since the basic stamp 2 came out. (not that I'm an expert, I've just been fiddling over a long amount of time)<p>I know that previous me was very scornful of micropython (the original boards were pretty expensive and power hungry)<p>However, the ESP* and SAM21 microprocessors have changed my opinion. Yes python is still wasteful. <i>but</i> I can now operate in the microamps, and for less than £7<p>Not only that, these micro controllers has a wealth of documentation and addons.<p>I feel like I've discovered the arduino all over again.
LEGO ist using it for SPIKE Prime and their related upcoming 51515 robotics set. There is even an inofficial firmware for their regular Powered UP electronics enabling MicroPython.
They really push the pyboard which is cool and all, but imho, the killer application for Micropython has been the ESP8266 port and now the ESP32.<p>The original pyboard can be had for around $20 and used to be closer to $30. The ESP8266 is a couple dollars, and the ESP32 is just north of $5.<p>Obviously, we're only talking about a handful of dollars, but for embedded systems, it matters.
Seeedstudio provides ArduPy for their Wio Terminal which can generate micropython libs from Arduino C Libs. So you can script Arduino Code with micropython on the device. As IDE they provide plugins for MS VisualStudo Code.<p><a href="https://wiki.seeedstudio.com/ArduPy/" rel="nofollow">https://wiki.seeedstudio.com/ArduPy/</a>
Another great resource for micropython tutorials is Miguel Grinberg’s blog [0]. In fact his blog is a gold mine for Flask development as well.<p>[0] <a href="https://blog.miguelgrinberg.com/category/MicroPython" rel="nofollow">https://blog.miguelgrinberg.com/category/MicroPython</a>
Fpga version so cover the really open issue?<p>Single global thread issue still around?<p>And whilst I like ulisp it is tie down with arduino and hope this will go out. Trying the js microprocessor implementation and let these two compete at least.
Can someone help demystify this for me?<p>If I got out a microscope and looked at cross sections of a pyboard, could an expert point out the sections of physical gates and other parts that implement each python bytecode?
I think Lua is also and already great at embedded usage? Of course the more the merrier.<p>tinygo, micropytho, lua, there were a few mini javascripts but I lost track any of them