µ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

Re: µPIDE a new IDE for beginners

Post by MasterOfGizmo » Sun Jul 11, 2021 5:14 pm

jedie wrote:
Sun Jul 11, 2021 11:37 am
Whats about backup of all files locally? Because maybe the device is not longer readable?
An import/export function for single files is definitely on the ToDo list. But a full backup/restore may be out of scope for this simple setup. I am actually not even sure about the import/export as this is something that may be confusing to beginners.

jedie
Posts: 252
Joined: Fri Jan 29, 2016 12:32 pm
Contact:

Re: µPIDE a new IDE for beginners

Post by jedie » Sun Jul 11, 2021 6:26 pm

I am thinking of an automatism. Which ensures that everything is saved and backup. Preferably also with a history.

And the next big thing is: How to manage more than one "projects"?

Another problem is device RAM limits. Quickly the memory is not enough. So .mpy bytecode files helps or freezing modules... If a IDE can handle this behind the scene, that will be great...

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

Re: µPIDE a new IDE for beginners

Post by MasterOfGizmo » Tue Jul 13, 2021 1:03 pm

I wonder how this could be done in a way that it isn't too confusing. First this would only work if the board and the computer are both kept in sync. The board with just the MPY files would not be useful without the source files on the computer.

Anyway, the latest version not supports ESP firmware flashing with the ESP32 and the ESP8266 and includes default micropython firmware images. It can thus now get a beginner with a bare ESP board running.

jedie
Posts: 252
Joined: Fri Jan 29, 2016 12:32 pm
Contact:

Re: µPIDE a new IDE for beginners

Post by jedie » Tue Jul 13, 2021 3:16 pm

MasterOfGizmo wrote:
Tue Jul 13, 2021 1:03 pm
I wonder how this could be done in a way that it isn't too confusing.
Yes, that's the question... But how silly would it be to lose the sources ;)

And how to switch between different Ideas aka projects on one devices?

Some brainstorming:
  • The user must input a unique "project" name.
  • He can create/edit/delete *.py files to the current project
  • All *.py sources are automagically saved under ~/uPIDE/{project_name}/
  • The use can sync the current project to any device
  • Store a UUID to any project and store this UUID on the device, too.
So:
  • The user sees only a list of project. Can switched between these Project and will see only the *.py files for the current project.
  • Load/save locally is not needed, because this is made in backgound.
  • The single point of truth of any project are the local files. The user can put any project to one or more devices.
  • rename the project (Because the UUID is the identifier) the renaming will only rename the directory: ~/uPIDE/{project_name}/
  • It's possible to store only .mpy bytecode files on the device
Think that can be done without confusing... Isn't it?

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 » Tue Jul 13, 2021 4:04 pm

About projects -- most beginner projects consist of a single file. If I were teaching MicroPython µPIDE, I would advise to save different "projects" as separate py files on the device, with file name being the project name. The run button would run the current file. For fixing a specific project as main project, one would edit main.py to contain "import <project_name>".

About export/import -- don't forget that the local disk can also fail. Also, in the classroom setting the user may not have their own directory. For single projects one could use low-tech solutions like e-mailing the code to themselves. For backing up the device, µPIDE could offer sending the flash content as zip-file to an e-mail address.

IMO introducing mpy files would complicate things unnecessarily (at least when considering µPIDE's implementation).

As I said earlier, I love the simplicity of this GUI and I advise to guard this carefully, otherwise it becomes harder to explain why the user should choose µPIDE over other IDE-s. Mu is also simple and beginner-friendly. (Thonny also tries to be, but it has sacrificed some of the potential simplicity for pleasing a bit more advanced users). Try to keep your unique touch!
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 » Tue Jul 13, 2021 6:52 pm

aivarannamaa wrote:
Tue Jul 13, 2021 4:04 pm
About projects -- most beginner projects consist of a single file. If I were teaching MicroPython µPIDE, I would advise to save different "projects" as separate py files on the device, with file name being the project name. The run button would run the current file. For fixing a specific project as main project, one would edit main.py to contain "import <project_name>".
This is exactly how it's meant to be used. Single file projects are indeed the primary use case.
aivarannamaa wrote:
Tue Jul 13, 2021 4:04 pm
As I said earlier, I love the simplicity of this GUI and I advise to guard this carefully
Don't worry. I'll am not planning for any feature creep. The import and export of single files will come and perhaps the ability to flash the pyboard firmware as well. But that's about what I have in mind for the µPIDE. And as you said: If you want more features, then there are already alternatives incl. the various command line tools.

davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: µPIDE a new IDE for beginners

Post by davef » Sun Jul 18, 2021 2:05 am

I have done:

Code: Select all

pip install python3
pip install pyqt5
pip install puqt5-tools 
and get this error on trying to run upide.py

Code: Select all

ImportError: no module named 'PyQt5'
I have been following this:
https://gist.github.com/marcoandre1/a77 ... b9c518b752
I have done up to step 4, but as I don't know if I need designer.exe I have stalled.

Do I need to do the designer.exe steps?
Do I need to setup some paths?

Thanks,
Dave

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

Re: µPIDE a new IDE for beginners

Post by MasterOfGizmo » Thu Aug 05, 2021 9:29 am

davef wrote:
Sun Jul 18, 2021 2:05 am

Code: Select all

pip install python3
Sounds like you already had Python2 installed and used that to install Python3 as well. I actually wasn't aware that something like "pip install python3" would do anything useful at all. Did that command actually work for you?

You need python3. On e.g. ubuntu the following command would install it:

Code: Select all

sudo apt-get install python3
Then you need PyQt5 for Python3. In your case it might help if you use pip3 instead of pip so you install PyQt5 for Python3 and not for Python2:

Code: Select all

pip3 install pyqt5
On ubuntu and friends you can also use apt-get for this:

Code: Select all

sudo apt-get install python3-pyqt5

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

Re: µPIDE a new IDE for beginners

Post by MasterOfGizmo » Thu Aug 05, 2021 9:32 am

In the meantime upide has learned a few more tricks. Most importantly it now includes a few esp32 and eps8266 micropython firmware images and can flash them by itself. So upide is all that's needed to get started with a off-the-self esp32 or esp8266 board.

davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: µPIDE a new IDE for beginners

Post by davef » Thu Aug 05, 2021 8:35 pm

I will double-check that I have everything installed in Ubuntu.

What I am struggling with is this ... uPIDE is a Windows program and it appears that all the applications used to support that are installed in a Linux machine. So, my first thought was since I have this dual-boot machine and I know that Ubuntu can look at files in the Windows partition just maybe uPIDE can access those Ubuntu applications somehow.

This doesn't work, hence the error:

Code: Select all

ImportError: no module named 'PyQt5'
I even tried installing PyQt5 in Windows.

Could you describe the environment one needs to run this program?

Thanks.

Post Reply