Micro:bit piano board Basic Course 2.1 Play Music
In this lesson we mainly know buzzers and learn how to use the play music blocks of Yahboom piano expansion pack to .
We will make the mciro:bit piano expansion board play music by graphical programming.
Mode 1 online programming: First, we need to connect the micro:bit to the computer by USB cable. The computer will pop up a USB flash drive and click on the URL in the USB flash drive: http://microbit.org/ to enter the programming interface. Add the Yahboom package https://github.com/lzty634158/YB_Piano to program.
Mode 2 offline programming: We need to open the offline programming software. After the installation is complete, enter the programming interface, click【New Project】, add Yahboom package:
https://github.com/lzty634158/YB_Piano, you can program.
3.Looking for blocks
The following is the location of the building blocks required for this programming.
4.Combine building block
The summary program is shown below:
5. Experimental phenomena
After the program is successfully downloaded, the micro:bit dot matrix will flash the music pattern and play the music "Happy Birthday" once, as shown below. If you need to start over, press the reset button on the back of the micro:bit board.
The code of the experiment: 1.Play_music.rar