41. MP3 Module(EF04104)#
It is able to play the music.
|Connection Type||Digital input|
41.4. Outlook and Dimension#
41.5. Quick to Start#
Materials required and connection diagram#
Connect the MP3 module to P1 port on sensor:bit.
41.6. MakeCode Program#
Click “Advanced” in the drawer of the MakeCode to see more choices.
We need to add a package for programming. Click “Extensions” in the bottom of the drawer and search with “https://github.com/elecfreaks/pxt-mp3player ” in the dialogue box to download it.
Note: If you met a tip indicating that the codebase will be deleted due to incompatibility, you may continue as the tips say or build a new project in the menu.
Code as below#
The MP3 module is controlled by the microbit.
Physical copy sequence, the first copy is 1. The name of the file can be left unchanged, and the file name cannot be specified separately.
The name of the file folder must be 2 digits(01~99), such as: 01.
The name of the MP3 file must include 3 digits(001~999), such as: 002~Palace.MP3.