Target audience for MicroPython?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Picasso
Posts: 39
Joined: Fri Mar 22, 2019 12:13 pm

Re: Target audience for MicroPython?

Post by Picasso » Mon Mar 25, 2019 8:13 pm

I don't think the problems for the no-firmware builders are difficult to solve. As long as the community wants it, and as long as the comunity does not dismiss every attempt with the 'minimal' dogma.

I'm quite optimistic that with some simple steps and decisions, we can set out the path to make micropython a place where the "no firmware builders" can get started in a blink and be happy too...There is no need to send them away to the circuitpython ... let's welcome them here ;-)

And ... I'm sure it can be done without compromising/sacrificing the current primary target audience ... ie "the firmware builders", the guys/girls that want to get the most out of every byte on the tiny devices, the core builders and even those who have written their first program in the form of punch cards using their bare hands and a pair of scissors ...

We would need some feedback though from other members ... is this what we want with MicroPython?

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Target audience for MicroPython?

Post by pfalcon » Mon Mar 25, 2019 11:02 pm

Picasso wrote:
Mon Mar 25, 2019 4:36 pm
Would you say it would be good if MicroPython at the same time could be be more 'open' towards python developers without C? Or should that type of developers simply accept that MicroPython is not really for them, so it is better to leave MicroPython and join the CircuitPython community for example?
Picasso, sorry, but you come here with some strange misconceptions, and put them up as truisms.

Misconception #1: You somehow think that MicroPython is somehow "closed" to Python developers. Sorry, but what can be more nonsensical than that? The whole purpose of MicroPython is to let Python developers to use Python where no other implementation could be used.

Misconception #2: You somehow think that people who use C might be followers of some esoteric cult bearing hidden knowledge closed to outsiders. In reality, they're fellow folks like everyone else. They use C when needed, and those who don't know when it's needed can read it up in the doc quoted above:
We write MicroPython in C not to keep writing code in C. We write it to let us and everyone write code in Python. This should be a good rule of thumb - anything which can be written in Python, should be written in Python, unless there're really good reasons to write it in C.
Any of MicroPython users can learn to use C (MicroPython users are inquisitive crowd and love to learn things!). And those who don't want to learn it, don't have to (they would just use a shrink-wrapped MicroPython product, like a PyBoard from the author of the MicroPython itself).


Finally, you seem to have some great ideas in mind. Start working on them today. By spending just a half an hour every day, you won't believe how much difference it will make in 3-5 years!
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/

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

Re: Target audience for MicroPython?

Post by stijn » Tue Mar 26, 2019 8:27 am

Picasso wrote:
Mon Mar 25, 2019 7:29 pm
Have you ever tried to build micropython on windows? Impossible.
Depending on what you define as 'build on windows', this is simply not true. Here are 4 cases which I think all qualify as 'build on windows' and are really not exceptionally hard, let alone impossible. And the first 3 should be able to cross-compile for microcontrollers if I'm not mistaken:
- get Cygwin, install gcc, build
- get msys, install gcc, build
- use WSL, build hower you want (probably the least qualified as 'build on windows' given what WSL is)
- get Visual Studio, open micropython.vcxproj, build (this gets you a .exe, to be clear)

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

Re: Target audience for MicroPython?

Post by Picasso » Tue Mar 26, 2019 9:20 am

@stijn
You are right. I rest my case. Everyones time is scarce ... mine too. Why bother ...

Hanilein
Posts: 26
Joined: Thu Jul 12, 2018 11:40 am
Location: Christchurch, New Zealand

Re: Target audience for MicroPython?

Post by Hanilein » Tue Mar 26, 2019 9:49 am

Interesting discussion, I have a slightly different vantage point, that has not been mentioned before.

I use microcontrollers for private and professional purposes, and so far have been programming them in C or C++ (or assembler *duck*).
A year ago colleagues and friends started to tell me more and more about Python, and I started to look around for a system, that is powerful enough for every day use, yet comfortable to use, light weight and flexible to change, and (very important), a community with some support (I don't expect miracles though).
I am not yet interested in using Python on the PC, I am interested in a µC-system, that I can use to develop a solution (combination of hardware and software) fast and comfortable, and i want to use this for hobby and professional purposes as well.
In any case, being in my 50ies now, I realize how precious time is, and I don't know how many more languages and systems I will want to learn in my life.

I do not fit in any of Picasso's original categories, for me the important points are:
  • A comfortable language, that enables me to develop fast solutions. Python is not perfect, but very good for that.
  • Powerful: I don't want to use a multitude of different systems. I want one or two different controllers, that I know how to work with. And I am happy to pay a bit more, when they have the grunt to do what I want. I understand, that some people use cheapest hardware, if possible - I have made the experience, that this is a waste of my time and consequently of my money. I always reach the limits of these cheap systems too fast.

    This becomes especially important when i am using microcontroller for professional purposes: One (!) engineering hour is more expensive than a PyBoardD. Depending on the scale of the endeavor, it is an easy calculation to do: how many engineering hours do I have to invest in a product until it is fit for purpose? How many units do I want to build? That determines my hardware cost. And when I am building small numbers of devices (let's say up to 10), my time is simply to precious to waste it by trying to jumping through hoops.
  • Light weight. That is a very important point, because the programming and maintenance effort to develop a solution and keep source code up-to-date is growing exponentially with the size.
    If the code is open-source, there is no obligation for anyone to service their code, in other words, I have to scrutinize every piece of code included into my own projects. Fair enough, it was free in first instance. But that takes time. And diligence. And it is much easier with a small system!
  • Support. Well, when I use a system that someone sells for money, I may have access to support - but i am also more or less depending on that company having an interest in helping me, and especially as a private customer that can be challenging.
    With open-source the community base must simply be large enough to support that system, and the drivers behind the development, aka the inventors, original developers and main contributors should be well involved.
  • A more or less comfortable tool-chain - a no-brainer, I don't want to wrestle with the toolchain, the project itself is challenging enough.
MicroPython and the pyboards tick all these boxes. Especially the lightweight character of MicroPython and the direct access to the underlying hardware is a great plus. I can access everything I need, the processors are powerful enough, I can use C++, if i have to, and the contributors are doing a great job.

And finally, Python and MicroPython will always (!) be different to a degree, simply because you are running an interpreted language without an operating system.
When you use a computer with an OS, the OS provides a Hardware Abstraction Layer, which must be reasonable complex. Running MicroPython leaves you without this HAL (and I appreciate this, I can write my own). Portability of the code and the commands of the particular implementation of MicroPython may differ slightly. You will always have to address these differences, and that means, to recognize the hardware capabilities.
Ivo Gorny

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

Re: Target audience for MicroPython?

Post by ThomasChr » Tue Mar 26, 2019 9:58 am

Just because I'm curios: In which way is CircuitPython simpler than Micropython?
Last time I checked there where no boards with more ram than the original Pyboard...
So all the Ram Limits should apply to CircuitPython too... or did I miss something?

Turbinenreiter
Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: Target audience for MicroPython?

Post by Turbinenreiter » Tue Mar 26, 2019 10:28 am

@ThomasChr

I don't think anyone in here understands what the threadstarters issue is.

MicroPython can't make the ESP8266 magically have more RAM.
The "drivers written in C" argument ... how many user-contributed drivers are there in C? Most of them are in Python.
The "can't build on windows" argument ... first of all, you can build on Windows, second - it's not MicroPythons fault that software development on Windows sucks.

The only thing I see that we can do here to improve the specific ESP8266 problem is to add the mpy-cross binary/exe to the download page, so people can more easily get that tool without compiling from scratch.

Other than that we have a 4 page thread now that is basically fighting a strawman argument that isn't even true. The whole point of MicroPython was to not need a compiler - just plug the board in and play. For sure we can try to make it even simpler, but the points brought up here are kind of ... untrue.

In a way, the ESP8266 may turn out to be a liability for MicroPython. People flock to it because of price and WiFi, but it is also not the easiest platform to start using MicroPython. It doesn't have the RAM for the filesystem and to use bigger libraries.

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

Re: Target audience for MicroPython?

Post by stijn » Tue Mar 26, 2019 11:06 am

@Hanilein yes, very good point about cost of time spent developing vs cost of an uC, though it's of course a bit different for a 'pure' hobbyist or when there's a lot of devices which have to get deployed.

MarkB
Posts: 1
Joined: Mon Mar 25, 2019 3:28 pm

Re: Target audience for MicroPython?

Post by MarkB » Wed Mar 27, 2019 3:21 pm

[quote=Picasso post_id=35146 time=1553544795 user_id=5105]
I'm quite optimistic that with some simple steps and decisions, we can set out the path to make micropython a place where the "no firmware builders" can get started in a blink and be happy too...[/quote]
Unless the thread objective is endless meta-discussion it might be helpful if you enumerated the "simple steps and decisions" you have in mind.

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

Re: Target audience for MicroPython?

Post by Picasso » Wed Mar 27, 2019 9:26 pm

MarkB wrote:
Wed Mar 27, 2019 3:21 pm
Unless the thread objective is endless meta-discussion it might be helpful if you enumerated the "simple steps and decisions" you have in mind.
It could be helpful indeed, but I've experienced oftentimes that it is very difficult to come up with a solution for non-existent problems. No one recognizes the problem I thought I laid out rather clearly. I'm OK with that. No problem.

Post Reply