Welcome to World of Module Sensor Kit repository
2.5 Python Programming Guide
1.Enter this website to download the Python programming software Mu, website: https://codewith.mu/.
2.Next, you will jump to the software version selection interface, select your current computer system to download and install the software.
3.After the installation is completed, the computer desktop will have a MU shortcut
. Double-click this shortcut to run Mu. The Microbit character in the lower right corner of Mu is normal. If it is other content, please click [Mode] in the upper left corner to modify to BBC micro:bit.
4.Then we need to import the Python library file for Superbit. In the file tutorial [Preparation before class] folder we can see a WOM_Sensor_Kit Pythonlibrary.hex file. We need to send or copy this hex file to the micro:bit drive letter. Then, click the [REPL] button of the Python programming interface to import this library file. After importing, we can see the text prompt as shown in the figure below on the Mu interface.
5.Then we can write the program by ourselves. After writing, click the [Check] button to check if there is any error in our code. If a cursor or underline appears on a line, it indicates a syntax error, please check and modify it. If there is no error, the bottom left will prompt that there is no problem.
6. Finally, we need to click the [Flash] button to download the program to the micro:bit board.
(Note: You need to click the [REPL] button again to turn off the function of importing library files to download the program normally).
During the downloading of the program, we can see that the orange indicator on the back of the micro:bit board will flash. When the orange indicator stops flashing and the prompt shown in the lower left corner of the Mu interface appears, it means that we have successfully downloaded the program to the micro:bit board.