Skip to content

A Visual Studio Code extension for students who code the BBC micro:bit with Python.

License

Notifications You must be signed in to change notification settings

FrankSAURET/microbit-explorer

Repository files navigation

Microbit Explorer

Explorer file on Micro:bit!

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.

vs-marketplace version lien github vs-marketplace installs vs-marketplace downloads vs-marketplace rating

Explorer file on Micro:bit!

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.
microbit_explorer1.mp4

Translate

  1. Clone repository.
  2. Run "npm install" at root.

stubs and error

  1. Duplicate one of the stubs-electropol-xx folder.
  2. Rename this folder with locales code (https://code.visualstudio.com/docs/getstarted/locales).
  3. Translate it (error are in "micropython\error.json")
  4. Pull request or send me by private message.

Interface

  1. You can use "i18n ally" extension as recommended.
  2. Duplicate the file with local code you understand (in src\locales).
  3. Rename it with locales code (https://code.visualstudio.com/docs/getstarted/.
  4. Translate it.
  5. Pull request or send me by private message.
  6. 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.

About

A Visual Studio Code extension for students who code the BBC micro:bit with Python.

Topics

Resources

License

Stars

Watchers

Forks