Target audience for MicroPython?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Target audience for MicroPython?

Post by pfalcon » Sun Mar 24, 2019 9:48 pm

Picasso wrote:
Sun Mar 24, 2019 8:14 pm
This response takes me a bit by surprise. I'm sure there is more to it than this.

I was under the impression that the name 'Micro' actually pointed to micro controllers,
No, who would want to waste their life on just microcontrollers? Besides, such projects already exist, e.g. PyMite, OwlPython, etc. All perfectly dead. Again, why waste life repeating their mistakes, instead of learning from them?
and not for example MicroHalonColliders.
MicroPython is not MicroHalonColliders, MicroPython is MicroAnything.
For many of the platforms (or field of applications) you are referring to, other Python platform already exist.
Great, the more reasons to not turn MicroPython into anything like them.
It seems to me, that it is difficult to do well if the focus is not clear.
The focus is absolutely and very clear - to be the minimal Python implementation.
Minimalism is not bad, but it seems that the new PYBD boards are capable of handling much more than just the absolut minimum.
You're apparently mix up MicroPython and specific products based on it. Rest assured that any vendor of a MicroPython product would add to it proprietary features in order to compete. That has little to do with MicroPython as a project which scales to millions of different boards.
Some smaller boards benefit from minimum. But more powerfull boards would benefit from more flexibility perhaps.
The purpose of MicroPython is the same as (big) Python - provide consistent programming environment regardless of hardware. Obviously, depending on the hardware, *user* applications will be different. The language and its API should be the same though, and in the case of MicroPython, minimal.
Is the architecture not in place to be flexible in these terms too? The core is minimum, the ports are per requirement of the boards, and additional drivers can be done in C but also in python.
MicroPython is way too flexible, most people don't even know its flexibility, far less using it. Regarding handling boards - that's of course how it is. Regarding "additional drivers": that has little to do with MicroPython. Additional drivers, modules, applications users develop and maintain on their own.
In that way, it would be possible to satisfy the 'non-firmware builders', and by doing so the community would prevent pushing a huge potential of micropython fanbase towards the commercial adafruit.
I'm not sure if it occurred to you, but any specific MicroPython product is a commercial endeavor, be it by George Robotics, PyCom, Adafruit, Sipeed, ST, NXP, etc. And each vendor will add glorious proprietary features to it to make their product "stand out". From the point of view of self-conscious MicroPython community, any board-specific features are bad - they fragment community and make writing portable software hard.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

ThomasChr
Posts: 114
Joined: Sat Nov 25, 2017 7:50 am

Re: Target audience for MicroPython?

Post by ThomasChr » Mon Mar 25, 2019 9:11 am

I have three projects in micropython:
- a sensor reading environmental data and streaming it to the Internet (ESP8266)
- a sensor reading power consumption pf my flat and streaming it to the Internet (ESP8266)
- a device able to decode morse tones into clear text (ESP32)

None of these required building the firmware.
Do you have examples where building the formware for a project really is neccesary?
Last edited by ThomasChr on Mon Mar 25, 2019 10:14 am, edited 1 time in total.

kevinkk525
Posts: 417
Joined: Sat Feb 03, 2018 7:02 pm

Re: Target audience for MicroPython?

Post by kevinkk525 » Mon Mar 25, 2019 9:57 am

https://github.com/kevinkk525/pysmartnode

As soon as you write some bigger projects, you'll need to build your own firmware because there's not enough RAM on the ESP8266 you use to compile or even load the precompiled files to RAM.
It actually happens quite quickly and even a good resilient communication library combined with a slightly bigger project is already taking too much RAM and needs to be frozen into the firmware.

ThomasChr
Posts: 114
Joined: Sat Nov 25, 2017 7:50 am

Re: Target audience for MicroPython?

Post by ThomasChr » Mon Mar 25, 2019 10:20 am

Okay, it may be that you need more ram. But the ESP32 with Spram has about 4 MB of Ram. Isn't that enough?
Although the new Pyboard will habe more Ram than the old Pyboard.

Picasso
Posts: 39
Joined: Fri Mar 22, 2019 12:13 pm

Re: Target audience for MicroPython?

Post by Picasso » Mon Mar 25, 2019 10:28 am

@kevinkk525
Regarding hitting the limitations so quickly on the ESP8266 .... the ESP8266 is not the most powerfull device right? If running into limits, you can optimize by building your own firmware, do the frozen modules thing etc ... But, you can also select the PYBD and have a go with that? Would that not give more space to work with? Or does that kite not fly?

So if the project grows, and the limits are being reached with a specific board, you can either optimize or select a bigger board. Some would prefer optimizing (and understandably so), others would simply get the bigger board. My guess is that the "non-firmware-building" people, will simply get the bigger board and focus on their application requirements.
Last edited by Picasso on Mon Mar 25, 2019 11:18 am, edited 1 time in total.

ThomasChr
Posts: 114
Joined: Sat Nov 25, 2017 7:50 am

Re: Target audience for MicroPython?

Post by ThomasChr » Mon Mar 25, 2019 10:31 am

@Picasso:
That also my impression. The ESP8266 with Micropython is only capable of doing very little and very basic stuff.
I thought that the Pyboard would not hit the limits so fast.
Also the new Pyboard-D or the ESP32 with extra Ram should handle big projects quite well, or won't they?

Picasso
Posts: 39
Joined: Fri Mar 22, 2019 12:13 pm

Re: Target audience for MicroPython?

Post by Picasso » Mon Mar 25, 2019 10:47 am

@ThomasChr
I think what you're describing is what a typical "no firmware builder" would do. Try avoiding the need to build firmware. So it is possible, as you demonstrated with these projects.
I am triggerred by various conversations here, where arguments are being made to favor 'minimal' at all cost. If all conversations are steered in the direction of 'minimal-minimal' , that would lead to library repo's full of c-only modules (for firmware builders only) and to features available for "firmware builders" only -- like crossover compiler.

It's a free world off course. People are free to decide for themselves if they are interested in building their module using C or stick to python.
I am hoping the MicroPython platform would be mature enough right now to move ahead and do both: Be the microcontroller platform for those who would like to hack around in C and optimize every bit and squeeze everything into a 2K device, and at the same time be the paltform that offers the millions of python developers (https://blog.pythonanywhere.com/67/) a simple experience. Get the board, add some sensors, select the right modules and make that dream project.

Picasso
Posts: 39
Joined: Fri Mar 22, 2019 12:13 pm

Re: Target audience for MicroPython?

Post by Picasso » Mon Mar 25, 2019 11:16 am

@pfalcon
To me it seems you are making your 'minimal' point very clearly and loudly. For you it is about minimal only, the least bit of 'bloat' will kill 'the project'. Every other argument will be defeated by the 'minimal' argument, right?

Just a thought ... do you not think that it is a better idea to use pure C to program those tiny devices you are referring to? The application size is probably small, so doable in C. The code base, if using MicroPython, effectively will be mainly C anyways ... (It is MicroPython and not something like FemtoPython right?).

You do not share the vision that the MicroPython community has a specific relation to the PYBD boards either? As you state correctly, MicroPython can be used on many boards from many vendors. However, only for a handfull of boards do we have the "readymade firmwares" available for download ... As you can imagine, for the "no-firmware-builders" that is rather significant difference. That makes the Pyboard/STM32/ESP boards rather special. Having the firmware available, makes those boards more 'usable' compared to those boards for which there is no up-to-date firmware available.

Would it not be great if MicroPython would be resource efficient AND python developer friendly?

Picasso
Posts: 39
Joined: Fri Mar 22, 2019 12:13 pm

Re: Target audience for MicroPython?

Post by Picasso » Mon Mar 25, 2019 11:23 am

ThomasChr wrote:
Mon Mar 25, 2019 10:31 am
Also the new Pyboard-D or the ESP32 with extra Ram should handle big projects quite well, or won't they?
I'm sure they do, that's the whole point of these boards having been developed right? More processing power, less space and less energy drain! With the availability of these boards, MicroPython now can (and should) move on.

stijn
Posts: 335
Joined: Thu Apr 24, 2014 9:13 am

Re: Target audience for MicroPython?

Post by stijn » Mon Mar 25, 2019 12:01 pm

Picasso wrote:
Mon Mar 25, 2019 11:16 am
Just a thought ... do you not think that it is a better idea to use pure C to program those tiny devices you are referring to? The application size is probably small, so doable in C.
As others pointed out already: the development itself in python is usually faster and more fun. So 'better' completely depends on the end goal.
Would it not be great if MicroPython would be resource efficient AND python developer friendly?
I'd say for the larger part, it is that exactly. The other part is your main complaint, rightfully so I guess, but I'm unsure how many people are affected by it. And it's anyway impossible to please everyone to the same extent. Definitely not when the goal is 'my tiny device must run Python'.

Post Reply