Page 1 of 4

µPIDE a new IDE for beginners

Posted: Thu Jul 08, 2021 7:22 am
by MasterOfGizmo
I was searching for a simple tool to allow the kids to play with micropython. Basically something like "Arduino IDE for Micropython". Of course this search led me to Thonny and especially uPyCraft. Thonny didn't pass the "kids test" as it was too complex in general for them to grasp the concepts. uPyCraft looked more promising but it took me some time to get it running on a recent Linux PC and after that many things weren't working as expected (e.g. one couldn't even close tabs). So i initially planned to fix the issues I had with uPyCraft but I wasn't too happy with the code base as such.

So I decided to start my own IDE: µPIDE

Image

It currently does exactly what the kids need and expect: They can create and run python code and do the typical file operations (move, delete, rename, new, ...) and they get some basic error highlighting. It does that without any configuration as it detects the board itself. So for the kids it's just a matter of running the IDE to get going.

Get the current version at https://github.com/harbaum/upide

There are still a few features on the agenda like a way to install the Micropython firmware in the first place and also some sort of demo/example library.

Re: µPIDE a new IDE for beginners

Posted: Thu Jul 08, 2021 7:40 am
by jimmo
That's neat, nice work!

FYI, are you aware of https://github.com/micropython/micropyt ... pyboard.py -- rather than maintain your own board remote control library. A lot of work has gone into making pyboard.py reliable and efficient.

Re: µPIDE a new IDE for beginners

Posted: Thu Jul 08, 2021 7:47 am
by MasterOfGizmo
Thanks for the pointer. I actually knew pyboard.py as part of ampy and I even used that in a different project. But it seems pyboard has made some progress between the last ampy release and the version you pointed to.

I'll take a look at that. Switching to a well-established base may indeed be helpful.

Re: µPIDE a new IDE for beginners

Posted: Thu Jul 08, 2021 7:56 am
by jimmo
Also take a look at mpremote too (which builds on pyboard.py) -- there's some really cool features, notably the ability to mount the PC filesystem onto the device and run code directly without copying it first.

Re: µPIDE a new IDE for beginners

Posted: Thu Jul 08, 2021 9:51 am
by MasterOfGizmo
jimmo wrote:
Thu Jul 08, 2021 7:56 am
Also take a look at mpremote too (which builds on pyboard.py) -- there's some really cool features, notably the ability to mount the PC filesystem onto the device and run code directly without copying it first.
While that sounds cool I don't see how that would support the beginners use case. Currently the µPIDE works directly on the target filesystem and ignores the PC filesystem completely. This way the kids simply carry "their" board with all their files around and don't have to worry about the PC at all. While cool features are interesting I definitely like to avoid feature creep that would confuse beginners.

Re: µPIDE a new IDE for beginners

Posted: Thu Jul 08, 2021 10:32 am
by MasterOfGizmo
jimmo wrote:
Thu Jul 08, 2021 7:40 am
A lot of work has gone into making pyboard.py reliable and efficient.
Uhm ...
This script can also be run directly. To execute a local script, use:
python pyboard.py test.py

Code: Select all

$ python3 ./pyboard.py test.py
Traceback (most recent call last):
  File "./pyboard.py", line 771, in <module>
    main()
  File "./pyboard.py", line 662, in main
    action=argparse.BooleanOptionalAction,
AttributeError: module 'argparse' has no attribute 'BooleanOptionalAction'
Of course i could now debug that. But that imho doesn't make too much sense if I already have a working solution.

Re: µPIDE a new IDE for beginners

Posted: Thu Jul 08, 2021 1:02 pm
by jimmo
MasterOfGizmo wrote:
Thu Jul 08, 2021 10:32 am
Of course i could now debug that. But that imho doesn't make too much sense if I already have a working solution.
BooleanOptionArgument was added to Python's argparse in late 2019, so this needs a newer version of Python than is on your system.

Looks like this dependency on BooleanOptionArgument was introduced to pyboard.py 13 days ago... I will add a note to PR https://github.com/micropython/micropython/pull/7459 that we should find a different solution as we do need to support older Python versions.

In the meantime, you can use this version -- https://github.com/micropython/micropyt ... pyboard.py

Re: µPIDE a new IDE for beginners

Posted: Thu Jul 08, 2021 5:55 pm
by aivarannamaa
Looks really nice!

I love how not supporting local files allowed you to simplify the UI and how the small filesystem of a MicroPython device makes things so much easier. It really is much more suitable for kids than Thonny (and even Mu).

There's one thing not apparent from the screenshot -- how does one add a new file?

Re: µPIDE a new IDE for beginners

Posted: Fri Jul 09, 2021 6:10 am
by MasterOfGizmo
aivarannamaa wrote:
Thu Jul 08, 2021 5:55 pm
There's one thing not apparent from the screenshot -- how does one add a new file?
The file view has a context menu which includes "new, rename and delete"

Re: µPIDE a new IDE for beginners

Posted: Sun Jul 11, 2021 11:37 am
by jedie
Whats about backup of all files locally? Because maybe the device is not longer readable?