MicroPython - Is it just me? - Page 1
Forum section: electronics / general

author: paulca
author_rank: Super Contributor
timestamp: July 11, 2025, 11:10:55 am
content: It's worse than STM32. I have been trying to get micropython working all morning.The documention is fragmented by too many MCUs supported and everything gets VERY specific very quickly before they even tell you that "micropython" is both firmware (this they make obvious) but also and entire python interruptor environment.In short, not one single tutorial worked. Not even "thonny" the ultra beginner setup. For a while everything single "first command" failed. Then I found a single line and screen shot buried in an intro page telling you to switch the interrupter to the micro-python one.Things started to make sense.Install "picozero" supposed to be "zero to hero" total beginner, child level, micropython.2 hours later I have given up. I just can't stomach another round of Python interrupter dependency errors.picozero can't install in thonny because thonny doesn't have setuptools. Installing all the dependencies int the pythong env and then running thonny... no.... not that lucky. Installing setup tools with thonny.... nasty "This depends on this, which is decrecated do not use, rerun with force to proceed".... but I didn't run it thonny did, so I can't.How is this in anyway easy? How is this in anyway "simple".2 weeks ago, I downloaded the RPi SDK stack as source and had it "blinkie" with RISC-V in only an hours effort. (Granted it took 2 hours to clone the git repo and anthoer hour to build it).Maybe it's too simple and I can't see the wood for the trees, but my first sniff of this says, "House of cards".EDIT: The last thing I did was to google "MicroPython - VSCode". They want me to install a whole Node.js environment for that.They can ____ right off. I do not like JS. I do not want to encourge it propagation into real software. Should have stayed as Blinking text and flashing marques IMHO.A Python IDE running in JS. That's a disaster for a start.

author: voltsandjolts
author_rank: Unknown
timestamp: July 11, 2025, 11:17:06 am
content: Works for me.

author: paulca
author_rank: Super Contributor
timestamp: July 11, 2025, 11:28:03 am
content: Quote from: voltsandjolts on July 11, 2025, 11:17:06 amGrrrrr,,,,,, <censored>

author: paulca
author_rank: Super Contributor
timestamp: July 11, 2025, 11:39:08 am
content: Installing picozero to the env produces this warning.However, Thonny are trapping errors on:response.isEmpty()So it aborts.The version I have installed is 80.9.0.dist, which the last time I did basic arithmetic is <81.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: July 11, 2025, 12:46:38 pm
content: What is an:Quote from: paulca on July 11, 2025, 11:10:55 amAfter reading on, you probably meant "interpreter" (a.k.a. REPL).I have bought a bunch of WeAct Black Pills, soldered a Winbond Flash chip on one of them and put micropython in the thing. After a reset my (Linux) PC recognized the thing as a flash drive. I could write a python script in a text etitor and save it to that device, and (I think) it executed the script I could also use the REPL after connecting to it with some terminal program.I wrote a blinking led script, verified it and then mostly lost interest. Everything together, I guess I spend about an afternoon on it in total. I find it difficult to find an excuse to use python on a microcontroller when you can use C or C++. One of the very few reasons I could think up was the ability to use the REPL to explore the registers of the STM32. Apparently it's got a table of register names and their adresses, so you could in theory use REPL to write to a timer register, and see changes in PWM on your oscilloscope. But the syntax is quite cumbersome. Recently I discovered STM32CubeProgrammer. It's a standalone application with which an STM32 can be programmed (it needs about 10 mouse clicks, while a properly integrated command line utilty in a make file can do the whole build verify and program cycle with one button from a decent IDE). So the STM32CubeProgrammer is not very interesting as a development tool, but It also has tables with all register names and it can use the debug interface to both view and set register content while the STM32 is running. So it is a quite nice tool to explore how the STM32 really reacts when you change I/O registers. I have successfully changed PWM width with this (in a first experiment). Next step is to set up and verify synchronization between different timers, before I put this into my software.

author: paulca
author_rank: Super Contributor
timestamp: July 11, 2025, 12:58:42 pm
content: I'm all to familar with Cube unfortunately.Python on an MCU as I see it for 2 possible reasons.1. All you know is python. So MCUs were off limits, now if you can pick a powerful one (STM32, ESP32) you can run python it!2. You have an MCU with a ton of RAM and 150Mhz dual cores and figure why not see if you can actually do anything useful in that high a level.I would be more in the later market. I am interested to see if it can be made useful and if it justifies the overhead in hobby land over Adruino or STM.On AMD64 a full python env consumes 30Mb upwards. So I expect micro-python to be pretty stripped down and I am interested to see if it makes it useless or not.

author: voltsandjolts
author_rank: Unknown
timestamp: July 11, 2025, 01:25:47 pm
content: I just use the prebuilt m-p binaries on supported mcus, and I find it useful; not for full on applications/projects but for bits of development work, like demos for small screen UI's, or wifi connected things. I've never tried to develop an actual complete product with it. Maybe I first need to spend more time with asyncio.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: July 11, 2025, 01:26:20 pm
content: About once a year I have a short peek at the micropython website. One of the things I use to estimate the "liveliness" of a project is to look at forum traffic, and the sort and amount of projects people do with it. From what I remember, there is not very much traffick on the micropython forum, and at the moment I can't check because it's down for maintenance.The easiest way to get started would be to buy an official micropython board (costing around GBP 30). And that is more expensive than a complete Linux PC these days. Power consumption of a micropython board is less, but if you're conserned about that, you would also not be using micropython in the first place.You also may want to look into "circuitpython". It is an (partly incompatible) early fork of micropython and (apparently) it does not have REPL. Personally I find it quite sad that circuitpython was drawing away resources from the circuitpython project before it even got started properly. Maybe circuitpython is more popular (better supported?) then micropython these days. But because I never had a good reason to use python on an uC for a real project, I never made a decent comparison.

author: rteodor
author_rank: Frequent Contributor
timestamp: July 11, 2025, 01:45:55 pm
content: I see ause case #3: testing new boards. Mostly what I use it for and its super useful.Sometimes also to very quickly hack together a web restfull API that I can use it with wget.Whatever simple things I tried usually worked after one or very few tries. Or it did not work at all.Now its true, I use the precompiled binaries, but once I compiled it for some Cortex-M7 as an exercise and as far I tried it it went just fine.

author: bentyler
author_rank: Contributor
timestamp: July 11, 2025, 03:31:29 pm
content: You ought to get a Raspberry Pi Pico with Micropython/Circuitpython already installed. That will make getting started easier.

author: gamalot
author_rank: Super Contributor
timestamp: July 11, 2025, 03:41:04 pm
content: It works fine for me, the last time I tried MicroPython was to overclock the Pi Pico 2 a few months ago

author: paf
author_rank: Regular Contributor
timestamp: July 12, 2025, 06:15:59 pm
content: What do you mean by "Installing picozero to the env"?What command did you use? Where?Have you tried "manual install"?https://picozero.readthedocs.io/en/latest/gettingstarted.html#manual-installIn order to "install" additional libraries, you just need to copy them to the "micropython" board.Works the same way with Pi Pico, ESP32, ESP32 C3, STM32, and so on.Micropyton is useful to check in a fast and easy manner if the board peripherals are "working".