Skip to content

Microbit-Team-12/editor

Repository files navigation

Micro:bit Python Editor

Team 12's project for the Group Design Practicals;

G-Research Group Project Prize for 2021 for a well-designed educational tool they created and a clear presentation and demonstration on how this tool can be used for learning purposes

Gallery

app when viewing the tutorial on displaying images

when there is an error, the duck is summoned

Using the editor

Adding a tutorial

The demo includes 4 tutorials:

  • Python Language Features
  • Python Errors
  • Displaying Images on micro:bit
  • Playing sounds on micro:bit

To add a new tutorial, first you need to write it in markdown. The current renderer supports the basic syntax but not HTML, and it has additional support for python code blocks. For example,

~~~py
# LINES 2-5
explanation = """The optional meta-comment above tells the renderer which lines of code to highlight.      2
The lines outside this range, both ends inclusive and counting from 1, will not be shown by default.       3
This feature can be used to hide the importations or unimportant implementation details from the students. 4
In this code block, precisely the lines declaring this multi-string will be highlighted.                   5""" 

print(explanation)
print("Did you know you could use ~~~ instead of ```")?

~~~

will turn into python code block with the 'Run', 'Toggle full code', 'Insert into editor' buttons

Finally, you need to

  1. Move the markdown file to public/tutorials
  2. Append the information about the tutorial to the list in src/resources/tutorial_list.ts

so that the application actually includes the tutorial you wrote.

Documentations