Hi,
I have worked on python and used it in Raspberry Pi and I have recently learnt about this micropython.
So, I want to know what is it about and why a developer needs to use it?
When we have python and Arduino C, as Arduino is used for ESP8266 or NodeMCU but here I have seen that people are using micropython for ESP8266.
Thanks.
Why Micropython?
Re: Why Micropython?
I will let one of the very many technical members reply with details, but I can tell you from my own experience that developing on microcontrollers using Micropython allows for much easier development and fast results.
I am not a programmer or a developer, but I have previously programmed simple programs onto micros using assembler and a little bit of C. The complexity and level of effort required meant I didn’t have the time to commit to such a task.
Fast forward a few years and Micropython has totally changed that and opened up a whole new area for people that would not normally program micro controllers, and definitely not with the scope and complexity that is covers.
Development is very fast as it’s all interpreted at run time and so debugging is easy and fast. Complex tasks have been extracted to such a high level that a few lines of code achieves a great deal.
Micropython is not fast in real world terms, but it is so powerful that the trade off in speed is more than acceptable. You can also drop into C or assembler if needed in parts as well.
In short, I have managed to achieve amazing results and develop a product using MP that I myself would have been unable to do otherwise.
The support on here is superb as well. For hobbyists and fast product development and potentially quick proof of concepts, I can’t see how it can be beaten.
The explosion in hugely capable micros and MP is a very attractive pairing for most.
I am not a programmer or a developer, but I have previously programmed simple programs onto micros using assembler and a little bit of C. The complexity and level of effort required meant I didn’t have the time to commit to such a task.
Fast forward a few years and Micropython has totally changed that and opened up a whole new area for people that would not normally program micro controllers, and definitely not with the scope and complexity that is covers.
Development is very fast as it’s all interpreted at run time and so debugging is easy and fast. Complex tasks have been extracted to such a high level that a few lines of code achieves a great deal.
Micropython is not fast in real world terms, but it is so powerful that the trade off in speed is more than acceptable. You can also drop into C or assembler if needed in parts as well.
In short, I have managed to achieve amazing results and develop a product using MP that I myself would have been unable to do otherwise.
The support on here is superb as well. For hobbyists and fast product development and potentially quick proof of concepts, I can’t see how it can be beaten.
The explosion in hugely capable micros and MP is a very attractive pairing for most.
Re: Why Micropython?
doublevee's answer is really good.
Since ESP8266s are cheap, why not try it?
You know that horrible delay you get in the Arduino IDE while it compiles the code then uploads the huge binary to the ESP8266? You don't get that with MicroPython. Upload the image once, then the Python code are uploaded as tiny files. You can even save and run them directly from any editor like Thonny virtually instantly. It's a much nicer environment for experimenting than in Arduino. You get a REPL, either via serial or wifi.
Since ESP8266s are cheap, why not try it?
-
- Posts: 4
- Joined: Thu Aug 12, 2021 10:13 pm
Re: Why Micropython?
Thanks guys for such detailed responses. I am going to try micropython on Esp8266.