repl on the BBC:Microbit
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: repl on the BBC:Microbit
The internal flash space is very limited, depending on the size of the MicroPython firmware installed. Like 15-30 KB, for example.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).
-
- Posts: 168
- Joined: Tue Nov 07, 2017 11:45 pm
Re: repl on the BBC:Microbit
To get things working you need to flash any empty python script to your micro:bit. You then need to use a file transfer utility to copy your main.py. the only method i remember is to use the mu editor. Using linux mint's file manager will not work.
To install mu on mint follow my instructions on https://askubuntu.com just search 'installing mu', i can't give you a better link i'm on my phone.
I've just done some searching to transfer files via the command line you need microfs, shortened to ufs. Then to list the files on the microbit, copy to the microbit, copy from the microbit type the following respectively
To install mu on mint follow my instructions on https://askubuntu.com just search 'installing mu', i can't give you a better link i'm on my phone.
I've just done some searching to transfer files via the command line you need microfs, shortened to ufs. Then to list the files on the microbit, copy to the microbit, copy from the microbit type the following respectively
Code: Select all
ufs ls
ufs put file.txt
ufs get file.txt[\code]
Re: repl on the BBC:Microbit
I came across a problem running main.py on boot after generating a blank 1.7.9 firmware.hex file using https://python.microbit.org/v/1
Using microfs, I could "ufs put main.py" and confirm it was there with "ufs ls", however, it just wouldn't execute on boot.
I cloned the microbit repo and compiled from source, put main.py and it ran on boot.
Something about the online editors blocks main.py from running.
I compiled the 1.7.9 and 1.9.2 firmwares from source and use them as a vanilla firmware for my project.
They are just the MicroPython runtime and allow main.py to run on boot.
https://github.com/mcauser/microbit-tm1 ... r/firmware
1. drag the firmware .hex file to the MICROBIT volume
2. ufs put library.py
3. ufs put main.py
4. reset
5. screen /dev/tty.usbmodem1412 115200
If you make a mistake in your main.py and you "brick" your device, simply drag the firmware .hex to the MICROBIT volume to start fresh.
Using microfs, I could "ufs put main.py" and confirm it was there with "ufs ls", however, it just wouldn't execute on boot.
I cloned the microbit repo and compiled from source, put main.py and it ran on boot.
Something about the online editors blocks main.py from running.
I compiled the 1.7.9 and 1.9.2 firmwares from source and use them as a vanilla firmware for my project.
They are just the MicroPython runtime and allow main.py to run on boot.
https://github.com/mcauser/microbit-tm1 ... r/firmware
1. drag the firmware .hex file to the MICROBIT volume
2. ufs put library.py
3. ufs put main.py
4. reset
5. screen /dev/tty.usbmodem1412 115200
If you make a mistake in your main.py and you "brick" your device, simply drag the firmware .hex to the MICROBIT volume to start fresh.