µPIDE a new IDE for beginners

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
MasterOfGizmo
Posts: 50
Joined: Sun Nov 29, 2020 8:17 pm

µPIDE a new IDE for beginners

Post by MasterOfGizmo » Thu Jul 08, 2021 7:22 am

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.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: µPIDE a new IDE for beginners

Post by jimmo » Thu Jul 08, 2021 7:40 am

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.

MasterOfGizmo
Posts: 50
Joined: Sun Nov 29, 2020 8:17 pm

Re: µPIDE a new IDE for beginners

Post by MasterOfGizmo » Thu Jul 08, 2021 7:47 am

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.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: µPIDE a new IDE for beginners

Post by jimmo » 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.

MasterOfGizmo
Posts: 50
Joined: Sun Nov 29, 2020 8:17 pm

Re: µPIDE a new IDE for beginners

Post by MasterOfGizmo » Thu Jul 08, 2021 9:51 am

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.

MasterOfGizmo
Posts: 50
Joined: Sun Nov 29, 2020 8:17 pm

Re: µPIDE a new IDE for beginners

Post by MasterOfGizmo » Thu Jul 08, 2021 10:32 am

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.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: µPIDE a new IDE for beginners

Post by jimmo » Thu Jul 08, 2021 1:02 pm

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

User avatar
aivarannamaa
Posts: 171
Joined: Fri Sep 22, 2017 3:19 pm
Location: Estonia
Contact:

Re: µPIDE a new IDE for beginners

Post by aivarannamaa » Thu Jul 08, 2021 5:55 pm

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?
Aivar Annamaa
https://thonny.org

MasterOfGizmo
Posts: 50
Joined: Sun Nov 29, 2020 8:17 pm

Re: µPIDE a new IDE for beginners

Post by MasterOfGizmo » Fri Jul 09, 2021 6:10 am

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"


Post Reply