5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10



Microbit-Python Course 6.11 Croco:kit talk

Posted by Fiona Su on

Microbit-Python Course 6.11 Croco:kit talk

Learning goals:

This lesson learns to use Python programming to make a buzzer on Croco:Kit sound.

Code

from microbit import *
import speech
display.show(Image.HAPPY)
speech.say("Hi, I'm an excellent robot from Yahboom.")
speech.say("Nice to meet you.")

Programming and downloading

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

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

image.png Figure 11-1

2. As shown in Figure 14-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 11-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 10-3.

image.png Figure 11-3

4.After downloading the program into micro:bit, you can see a smile pattern on the Micro:bit dot matrix and make a sound: Hi, I'm an excellent robot from Yahboom. Nice to meet you.

image.png

 The code of the experiment: 11.Crocokiy talk.rar

Buy Yahboom Croco:kit sensor starter kit for micro:bit

0 comments

Leave a comment

Please note, comments must be approved before they are published