Spring Sale: 5% OFF Over $89, Code: Elephant5; 10% OFF Over $149, Code:Elephant10



Micro Python Basic Course 1.Hello,World

Posted by SuFiona on

Micro python course 1.Hello,World

Learning goals:

This lesson learns to scroll through the characters on a micro:bit dot matrix by Python programming.

Code :

from microbit import *

display.scroll("Hello, World!")

Programming and downloading

1. You should open the Mu software, and enter the code in the edit window, , as shown in Figure 1-1.

Note! All English and symbols should be entered in English, and the last line must be a space.

image.png 

Figure 1-1

2. As shown in Figure 1-2, you need to click the Check button to check if our code has an error. If a line appears with a cursor or an underscore, the program indicating this line is wrong.

image.png Figure 1-2

3. You need to connect the micro data cable to micro:bit and the computer, then click the Flash button to download the program to micro:bit as shown in Figure 1-3.

image.png 

Figure 1-3

4.After the download is successful, you can see that the micro:bit dot matrix slowly moving to the left , "Hello, World!", as shown in Figure 1-4 and Figure 1-5.

image.png   

Figure 1-4                                                              

image.png

 Figure 1-5

 The code of the experiment: 1.HelloWorld.zip

Micro Python Basic Course

0 comments

Leave a comment

Please note, comments must be approved before they are published