TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

MicroPython

338 pointsby neilpanchalalmost 5 years ago

31 comments

neilpanchalalmost 5 years ago
MicroPython is stellar. If you&#x27;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&#x2F;patch&#x2F;contribute&#x2F;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&#x2F;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&#x2F;C++ modules and compile a MicroPython bindings.<p>I think this is one of the best things that&#x27;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:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=437CZBnK8vI" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=437CZBnK8vI</a>
评论 #24183060 未加载
评论 #24181327 未加载
评论 #24180821 未加载
评论 #24180414 未加载
评论 #24182483 未加载
评论 #24182049 未加载
评论 #24181165 未加载
评论 #24183829 未加载
评论 #24183616 未加载
评论 #24182749 未加载
评论 #24184014 未加载
dangalmost 5 years ago
If curious see also<p>2014 <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7840566" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7840566</a><p>also 2014 <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=6996692" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=6996692</a><p>2015 <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9558969" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9558969</a><p>2016 <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=11181158" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=11181158</a><p>Many submissions but those seem to be the interesting threads.
评论 #24180646 未加载
pansa2almost 5 years ago
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?
评论 #24180594 未加载
评论 #24180235 未加载
评论 #24180736 未加载
评论 #24180275 未加载
评论 #24182708 未加载
评论 #24180098 未加载
评论 #24184691 未加载
评论 #24180186 未加载
评论 #24182937 未加载
评论 #24180850 未加载
teddyhalmost 5 years ago
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:&#x2F;&#x2F;sneklang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sneklang.org&#x2F;</a>
评论 #24181094 未加载
评论 #24182935 未加载
fxjalmost 5 years ago
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:&#x2F;&#x2F;maixpy.sipeed.com&#x2F;en&#x2F;" rel="nofollow">https:&#x2F;&#x2F;maixpy.sipeed.com&#x2F;en&#x2F;</a>
评论 #24182166 未加载
评论 #24183452 未加载
btgeekboyalmost 5 years ago
I once built a METAR light map like this - <a href="https:&#x2F;&#x2F;slingtsi.rueker.com&#x2F;making-a-led-powered-metar-map-for-your-wall&#x2F;" rel="nofollow">https:&#x2F;&#x2F;slingtsi.rueker.com&#x2F;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.
评论 #24180600 未加载
ak_25almost 5 years ago
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&#x2F;firmware as much.
评论 #24182221 未加载
评论 #24182781 未加载
评论 #24180155 未加载
评论 #24179842 未加载
StavrosKalmost 5 years ago
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.
评论 #24179864 未加载
评论 #24181157 未加载
nooberminalmost 5 years ago
Does anyone have any experience beyond short programs&#x2F;sketches with micropython? The most I&#x27;ve used it for is playing around with a microbit. How does it hold up?
评论 #24184807 未加载
评论 #24181666 未加载
评论 #24183886 未加载
not_the_fdaalmost 5 years ago
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&#x27;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 &lt; $1.<p>A difference of $40 in BOM cost makes it only applicable to the hobbyist. Which is fine, but its just a toy.
评论 #24180984 未加载
评论 #24180528 未加载
评论 #24180871 未加载
评论 #24182664 未加载
评论 #24181424 未加载
评论 #24180383 未加载
pansa2almost 5 years ago
&gt; <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&#x27;s newer features wouldn&#x27;t &quot;pull their weight&quot;?
评论 #24182804 未加载
评论 #24181178 未加载
alpineidyll3almost 5 years ago
In my experience, one should understand the c dependencies to use micro&#x2F;circuit python for most of desired uses. Still great stuff. The mere decrease in linecount for simple algs has real value.
评论 #24180273 未加载
VectorLockalmost 5 years ago
The coolest application of Python on uCs that I&#x27;ve seen recently is in the custom mechanical keyboard space:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;makerdiary&#x2F;python-keyboard" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;makerdiary&#x2F;python-keyboard</a><p>I&#x27;m loving the thought of being able to customize my keyboard&#x27;s functions by just dropping python files onto its USB drive. Looking forward to using this on my Dactyl-CC build.
fxjalmost 5 years ago
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:&#x2F;&#x2F;flow.m5stack.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;flow.m5stack.com&#x2F;</a>
skybrianalmost 5 years ago
I&#x27;m more familiar with CircuitPython because I&#x27;ve bought a few boards that could run it, though I&#x27;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?
评论 #24181459 未加载
snvzzalmost 5 years ago
Remarkably, it has recently gained (still not mainlined) 68000 support: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;micko_mame&#x2F;status&#x2F;1256221039308267520" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;micko_mame&#x2F;status&#x2F;1256221039308267520</a>
FpUseralmost 5 years ago
I&#x27;ve done quite a few firmware development projects (they&#x27;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.
butzalmost 5 years ago
For rapid GUI application prototyping LVGL has micropython bindings: <a href="https:&#x2F;&#x2F;github.com&#x2F;lvgl&#x2F;lv_micropython" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lvgl&#x2F;lv_micropython</a> .
KaiserProalmost 5 years ago
I&#x27;ve been doing microprocessor stuff since the basic stamp 2 came out. (not that I&#x27;m an expert, I&#x27;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&#x27;ve discovered the arduino all over again.
oaieyalmost 5 years ago
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.
halbrittalmost 5 years ago
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&#x27;re only talking about a handful of dollars, but for embedded systems, it matters.
fxjalmost 5 years ago
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:&#x2F;&#x2F;wiki.seeedstudio.com&#x2F;ArduPy&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wiki.seeedstudio.com&#x2F;ArduPy&#x2F;</a>
wilsonfiifialmost 5 years ago
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:&#x2F;&#x2F;blog.miguelgrinberg.com&#x2F;category&#x2F;MicroPython" rel="nofollow">https:&#x2F;&#x2F;blog.miguelgrinberg.com&#x2F;category&#x2F;MicroPython</a>
ngcc_hkalmost 5 years ago
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.
Waterluvianalmost 5 years ago
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?
评论 #24184075 未加载
ausjkealmost 5 years ago
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
aitchnyualmost 5 years ago
Has anybody got requests and&#x2F;or full HTTPS protection working?
geophilealmost 5 years ago
Can anyone comment on what parts of Python are not in MicroPython?
评论 #24182826 未加载
评论 #24182691 未加载
D0zMealmost 5 years ago
Perhaps it would be useful to package it for mobile phones.
foxh0undalmost 5 years ago
Have a few M5&#x27;s, they&#x27;re great little gadgets.
liquidifyalmost 5 years ago
anyway to get wifi?
评论 #24184967 未加载
评论 #24182831 未加载