Microbit Explorer
A Visual Studio Code extension for students who code the BBC micro:bit with Python.
Explore micro:bit with MicroPython in Visual Studio Code.
This is principally based on:
sos82 extension : https://github.com/sos82/vscode_micropython
And also on:
Stapted extension : https://github.com/oivron/microbit-extension-vscode
microsoft garage device simulator : https://github.com/microsoft/vscode-python-devicesimulator
Thanks for their work.
Features
- Provides translated stubs and error (see below) for microPython and micro:bit.
- Supports both micro:bit V1 and V2.
- Quickly send py file to the micro:bit.
- If wanted, clear all comments and empty line.
- Reads and translate error messages from the micro:bit.
- Add button to send file directly in micro:bit main file.
- Add contextual menu in file explorer to send file to micro:bit with or without comments.
- Possibility to directly update micro:bit firmware.
- Possibility to display micro:bit pinout.
and in the explorer view
- Explore files in micro:bit.
- Upload all files to micro:bit.
- Download files from micro:bit to local space.
- Delete file on micro:bit.
- Add "Micro:bit" output to get status of device and reporting error.
Preconditions
- Install MicroPython in micro:bit first.
- Have open folder or workspace to use features.
- Install Python and Pylance microsoft extensions.
How to use
- Click on the colored micro:bit button to send your python file into main.py on micro:bit. This button only appears for .py files.
or
- Right click in on one file in the file explorer to send the file without renaming it into the micro:bit with or without comments.
Error message (and others) appears directly in the output console.
- Or click on micro:bit icon to open microbit explorer.
https://user-images.githubusercontent.com/1547522/164513525-d6d341de-2d4d-4e49-8d26-67e57ef89f80.mp4
Translate
- Clone repository.
- Run "npm install" at root.
stubs and error
- Duplicate one of the stubs-electropol-xx folder.
- Rename this folder with locales code (https://code.visualstudio.com/docs/getstarted/locales).
- Translate it (error are in "micropython\error.json")
- Pull request or send me by private message.
Interface
- You can use "i18n ally" extension as recommended.
- Duplicate the file with local code you understand (in src\locales).
- Rename it with locales code (https://code.visualstudio.com/docs/getstarted/.
- Translate it.
- Pull request or send me by private message.
- If you want to test, copy the file in the root folder and rename like package.nls.XX.json where XX is the local code.
Quick links
Contribution
Contributions are always welcome.
| |