Live data from Hacker News

MicroPython

micropython.org

71–80 of 152 posts

Re: MicroPython

#71

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.

For plumbing stuff together it's probably great. Anything lower level that requires performance or real time constraints will probably not do.

Micropython can do some real-time stuff. It's limited, but a bit easier in my experience than getting a Preempt-RT running on a Raspberry Pi.

Re: MicroPython

#72
post #14

MicroPython seems to be heavily focused on embedded systems . Is there any support for embedding it within an application , i.e. as a replacement for Lua? Or is there another lightweight Python implementation (or Python-like language) that supports this?

What is lightweight for you? I bundled the official Python (CPython 2.7, that was some years ago; but I don't think CPython 3 would be so much different) in an application ( http://albertz.github.io/music-player/ ), and the whole MacOSX app zip file ended up at 11 MB. This includes my whole app + whole CPython 2.7 (including all stdlib) + extra Python libs (all the ObjC/Cocoa bindings, which I use for the GUI). I fin…

Wow. Very interesting. Hope it can be upgraded to 3

Re: MicroPython

#73
The coolest application of Python on uCs that I've seen recently is in the custom mechanical keyboard space:

https://github.com/makerdiary/python-keyboard

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.

Re: MicroPython

#76

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. This is what Arduino and Arduino IDE did for millions of hobbyist, but it is time to ditch C/C++ for MicroPython. In this [1] PyCon talk by Matt Trentini, a demo of QR code g…

The one big issue I've had with MicroPython is that it's a PITA to manage files on it. I use this hacky tool called "ampy" to do it, and wish that the device could just be mounted as a media device. CircuitPython, however, does accomplish this, with the microcontroller showing up just like a USB drive.

Re: MicroPython

#77
post #76

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. This is what Arduino and Arduino IDE did for millions of hobbyist, but it is time to ditch C/C++ for MicroPython. In this [1] PyCon talk by Matt Trentini, a demo of QR code g…

The one big issue I've had with MicroPython is that it's a PITA to manage files on it. I use this hacky tool called "ampy" to do it, and wish that the device could just be mounted as a media device. CircuitPython, however, does accomplish this, with the microcontroller showing up just like a USB drive.

I like this feature of Circuit Python too. An issue is that some boards don't have the USB hardware needed to make this work.

Re: MicroPython

#78
post #65

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. htt…

That is awesome! Unfortunately the K210 link on the site is giving me a certificate error so I'm a bit afraid clicking into it. Do you know if the library will work with (https://www.seeedstudio.com/Sipeed-Maix-Cube-p-4553.html)?

Re: MicroPython

#79
post #2

I think this is good for someone getting started with microcontrollers(similar to the Arduino) However, one should not be disillusioned — I doubt this can be used to deploy a mass market product. However, I can see micro-python’s value in rapid-prototyping to some extent for someone who is not into embedded/firmware as much.

In my view, nothing can be used to deploy a product, without further consideration.

My rationale for saying this is that in addition to programming in any language, you need to understand hardware, including safety. And I think that by the time a person reaches that level of knowledge, they have probably familiarized themselves with programming at a variety of levels from bare-metal C up to desktop software.

Now, I've only been playing with MicroPython (actually the CircuitPython fork) for a few months, and at this point haven't come up with a "scale" of project that needs more than bare metal C but less than a full blown operating system. But then again I haven't come up with any good product ideas in that time period.

As I mentioned to a friend of mine: "Hi, we're programmers, and we're here to burn your house down."

Between the two real projects that I'm nursing along right now, one uses a FFT and the other an interrupt running at 170 kHz, so neither of those can be pure Python projects yet.

Re: MicroPython

#80
I think Lua is also and already great at embedded usage? Of course the more the merrier.

tinygo, micropytho, lua, there were a few mini javascripts but I lost track any of them

Post reply on HN