'Files' Button of Mu Editor

Questions and discussion about running MicroPython on a micro:bit board.
Target audience: MicroPython users with a micro:bit.
Post Reply
yk22wong
Posts: 10
Joined: Tue Dec 26, 2017 11:25 am

'Files' Button of Mu Editor

Post by yk22wong » Tue Jul 31, 2018 5:20 am

I have recently installed Mu Editor (version 1.0.0beta16) on My Windows 10 PC. Installation was a breeze and every 'Button' is working as I understood, except the 'Files' button.

(1) Based on some printed doc description, if I click the 'Files' Button, I can see two panes opened and the left one showing the files in my Micro:bit and the right one showing the files in my PC. I do get two panes. The right one is showing my ***.py files in my PC but the left pane is empty although I know I have successfully flashed the file into the Micro:bit (I know it is successful because the Micro:bit is behaving as I have scripted). Question number one is whether it is normal to see an empty left pane in this situation?

(2) I told myself perhaps the left pane can only show the ***.py file but not the hex file (which is the flashed resultant file). But if this is the reason I see an empty left pane, what is the point of having the left pane?

(3) I can drag a py file from the right pane (PC directory) to the left pane. But after dragging it to the left it is still a py file , not a hex file. So I cannot run it. Then isn't it no point of doing this dragging action?

I appreciate any advice, comments, guidance or even mockery (if I have totally misunderstood this button).

Many thanks in advance.

rhubarbdog
Posts: 168
Joined: Tue Nov 07, 2017 11:45 pm

Re: 'Files' Button of Mu Editor

Post by rhubarbdog » Tue Jul 31, 2018 10:14 pm

Flashed files disapear. Flashing wipes the microbit.
You put files onto the recently flashed microbit using Mu's file button or ufs (micro fs).
If you flash an empty script onto a microbit you can put main.py to be executed when you reset the microbit. Otherwise you need to import the secondary.py files in the script you flash/main.py.

yk22wong
Posts: 10
Joined: Tue Dec 26, 2017 11:25 am

Re: 'Files' Button of Mu Editor

Post by yk22wong » Wed Aug 01, 2018 2:27 am

Hi Rhubarb, Thanks for your post. But I am not sure if I fully understand.

(1) So you are saying that it is normal I do not see any HEX file shown on the left pane?
(2) Are you also saying that if I name my py file as main.py, I will see it in the left pane after flashing?

rhubarbdog
Posts: 168
Joined: Tue Nov 07, 2017 11:45 pm

Re: 'Files' Button of Mu Editor

Post by rhubarbdog » Wed Aug 01, 2018 5:34 am

yes and yes.
Mu flashes a vanilla copy of a .hex file then puts your script as main.py
where as uflash creates an executable .hex file from a vanilla .hex file and the micro pythonscript your flashing

yk22wong
Posts: 10
Joined: Tue Dec 26, 2017 11:25 am

Re: 'Files' Button of Mu Editor

Post by yk22wong » Wed Aug 01, 2018 6:09 am

Thanks, Rhubarb. I'll explore and experiment a bit further (based on what you described) and see if I have a better gripping of this issue.

Post Reply