Welcome to Tiny:bit Pro repository
3.Python Programming
3.Python Programming
1.You need to open browser, input this URL to download software. You need to click “Download”, as shown in the following figure.
2.Next, you will jump to the selection interface, and select your current computer system and click Download. There are three options to choose from, followed by Windows, OSX, and Linux. As shown in the following figure.
3.You can run Mu software after downloading.

Load:Load the "py" program file from the computer
Save:When you click “Save”button. The code will be saved to your computer in "py" format.
Flash:You need to make sure that the micro:bit board is connected to the computer. When you click “Flash” button, the code will run on micro:bit (or see an error message scrolling on the micro:bit dot matrix).
Zoom-in:Clicking on the "+" button will enlarge font of code
Zoom-out:Clicking on the "-" button will narrow font of code.
Theme:Clicking "Theme" to switch between day and night themes.
Check:After the code is written, click the "Check" button to Check for errors.
Help:Clicking the "Help" button will pop up a page in the browser that will give you some help.
Quit: Click the “Quit” button to close the Mu software. Before closing, Mu will ensure that you have saved your program files.
4. For example: If we need to display the code of “Hello, World!” on the micro:bit dot matrix, you can write the code in the editing area, then connect the micro:bit board to your computer by micro USB cable, as shown in the following figure. You need to click “Flash” to download the code to micro:bit.
Code:
from microbit import *
display.scroll("Hello, World!")
Note:
1 - The capital letter / lowercase letters must be distinguished!
2 - Correct spelling!
3 - Keywords such as # need a space between the content.
4 - The program ends with a blank program.
5 - The block body (such as the body of the while is marked by indentation), compared to the C language, Python completely eliminates the braces (along with the semicolon of the suffix), and uses the indentation structure to represent the relationship.
6 - Use the Tab key (tab) to indentation.
5.After the code is written, we can click the “Check ”button of the thumb icon to check our codes.
6. After the check is completed, if the code no error. You need to make sure that the micro:bit development board is connected to the computer and you need to click “Flash” button.
7.After clicking the “Flash”, you can observe that the indicator light on the micro:bit board is flashing, indicating that the program is being downloaded. As shown in the following figure.
8.When the indicator light is on, indicating that the program is downloaded successfully.
9.At this point, you can see that the micro:bit dot matrix is slowly moving to the left, "Hello, World!". As shown in the following figure.
