pip install uflash pyserial- Connect your MicroBit, make sure you have a microUSB data-capable cable.
uflash- Flashes the MicroPython firmware to the MicroBit.
- Run
miniterm.py - Select the port that your microbit is connected to.
- Press
CTRL+Tfollowed by ab, enter115200as the baud rate - Press
RETURN, this should show you the REPL's>>>.
Once you know the port of the microbit you can use miniterm.py /dev/ttyACM0 115200 instead, where /dev/ttyACM0 is the name of the port.
- Save your code as
foo.py uflash foo.py
microbit module documentation https://microbit-micropython.readthedocs.io/