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 12:45 pm

stijn wrote:
Mon Mar 25, 2019 12:01 pm
As others pointed out already: the development itself in python is usually faster and more fun. So 'better' completely depends on the end goal.
Yeah, the fun part is also important. I agree. What I meant with better in this context is, a) better for MicroPython and b) easier for the developer to even get more out of a tiny device (assuming the end goal is to get the maximum out of such tiny device).
stijn wrote:
Mon Mar 25, 2019 12:01 pm
I'd say for the larger part, it is that exactly.
I definitely agree. MicroPython seems to have it all. The only thing is, what is the vision? The vision largely determines the priorities. And that is my main point of concern. Since the prioritising process seems to be dominated by the 'minimal dogma'. That is fun for some, but it imposes many restrictions to many others.
stijn wrote:
Mon Mar 25, 2019 12:01 pm
And it's anyway impossible to please everyone to the same extent. Definitely not when the goal is 'my tiny device must run Python'.
Totally agree. Hard to please everyone. Without focus everything is doomed. Having the focus slightly off ('my tiny device must run Python') also makes things overly difficult or restrictive. The market is evolving. MCu's are getting more powerfull. Boards are introduced (PYBD). Time for a small shift in focus?
By simply stating the intended target audiences, a new up-to-date focus would be more or less defined.

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

Re: Target audience for MicroPython?

Post by kevinkk525 » Mon Mar 25, 2019 3:00 pm

An important point is the price of the devices. I'd happily develop everything for the pyboard D instead of worrying about building my firmware and running out of ram on my esp8266 but I don't have the money to spend over 30€ on one device when I can place 2 esp8266 in every room of my apartment for the price of one pyboard D.
But that's also application dependant. When building a smart home, esp8266 are perfect and if I need more, I take the Esp32 which is affordable.

Developing anything in C is however not in my interest as it is slow and more complicated. So even on the esp8266 I do everything in python, just as optimized or modular as possible.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

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

Re: Target audience for MicroPython?

Post by Picasso » Mon Mar 25, 2019 4:36 pm

kevinkk525 wrote:
Mon Mar 25, 2019 3:00 pm
An important point is the price of the devices...
I totally understand your calculation. Every project has it's specifics. I'm sure the community comprises of many people doing Python and some basic C if required, and are benefitting from the 'minimal'-argument discussions.

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?

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

Re: Target audience for MicroPython?

Post by kevinkk525 » Mon Mar 25, 2019 4:40 pm

I came to micropyton and haven't touched a single line in C. I programmed in Python before but also in C/C++ for Arduino but was happy to leave that behind.
In my opinion, micropython looks "open" to python developers without C.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

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

Re: Target audience for MicroPython?

Post by Picasso » Mon Mar 25, 2019 5:42 pm

Just out of curiousity ... Have you ever build your own custom firmware and used it in any of your projects? Even if it did not require any modifications in C, perhaps to support another board or some existing C module?

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

Re: Target audience for MicroPython?

Post by kevinkk525 » Mon Mar 25, 2019 5:44 pm

Yes, I always build my own firmware for the ESP8266. Not for the ESP32 though, I just copy the files onto it or use .mpy to save some RAM.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

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

Re: Target audience for MicroPython?

Post by Picasso » Mon Mar 25, 2019 7:06 pm

kevinkk525 wrote:
Mon Mar 25, 2019 5:44 pm
Yes, I always build my own firmware for the ESP8266. Not for the ESP32 though, I just copy the files onto it or use .mpy to save some RAM.
To me it sounds like, MicroPython is sufficiently open for you. You can use the mpy files, you can switch modules on or off (turning on/off the btree module for example). You are not restricted at all. No-firmware builders have a different experience.

The question I'm raising is, would/should it be a goal to have micropython working for non-firmware building python developers too?
Or should we all convert them into firmware builders? Or send them to circuitpython?

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

Re: Target audience for MicroPython?

Post by kevinkk525 » Mon Mar 25, 2019 7:18 pm

Yes it is, although my projects are quite big. Building a firmware might be a strange experience for some no-firmware builders that come from Python but it's quite straight-forward.
Only thing I changed was the irom0 size so my project fits into the firmware image.

I tried without building a firmware but even the library for resilient communication between a server and the esp8266 (micropython_iot) does run out of RAM during compilation and has to use .mpy files, so I'm surprised that people manage to write bigger projects for the esp8266 without building their firmware.

The ESP32 might be a good entry point for python programmers as it is cheap and offers a sufficient amount of RAM (even without using SPRAM) or of course the Pyboard D if you want to spend that much money.
I think we have just different difficulty levels for entering the micropython world.
For most people micropython will be about developing applications for microcontrollers because on more powerful non-baremetal platforms, they'd use CPython anyway. But when thinking about teaching micropython and microcontollers to e.g. children/students then the entry difficulty should be as low as possible and therefore compiling a firmware or having contact to any C code should be avoided. But that's already pretty well covered as even the esp8266 has enough RAM to compile small applications for that purpose.

We have a unix port too but honestly, that's probably of not much practical interest for someone coming from CPython, except for trying his code and learning about micropython specifics.
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

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

Re: Target audience for MicroPython?

Post by Picasso » Mon Mar 25, 2019 7:29 pm

Have you ever tried to build micropython on windows? Impossible. Giles Thomas has analysed there must be millions of python developers on windows. https://blog.pythonanywhere.com/67/ They will all be restricted, and will go look further for alternatives.

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

Re: Target audience for MicroPython?

Post by kevinkk525 » Mon Mar 25, 2019 7:34 pm

Picasso wrote:
Mon Mar 25, 2019 7:29 pm
Have you ever tried to build micropython on windows? Impossible. Giles Thomas has analysed there must be millions of python developers on windows. https://blog.pythonanywhere.com/67/ They will all be restricted, and will go look further for alternatives.
Hmm yeah that might be a problem. I use WSL to build my firmwares, which works fine.
Maybe an online-service for building firmwares would be an alternative? (Don't know about copyright and other legal stuff in that area)
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode

Post Reply