How To Download And Play Mp3 From Microbit

Introduction

Connect an Audio Player Lath to the Chip Board and control playback of sounds with the micro:fleck

Video Overview

Featured Certificate

  1. We're going to use simple buttons to trigger our sounds, but you can later swap them for other input or sensors. You can even create paper switches using Maker Tape. Using Maker Tape connect eight Crazy Circuits Standard Pushbutton Chips as shown. Each button will connect to a pin (1 through 8) and will also connect to GND (ground).

    • We're going to use unproblematic buttons to trigger our sounds, but you tin later swap them for other input or sensors. Y'all can fifty-fifty create newspaper switches using Maker Tape.

    • Using Maker Tape connect viii Crazy Circuits Standard Pushbutton Fries as shown. Each button volition connect to a pin (1 through 8) and will as well connect to GND (ground).

    • Buttons do non accept a polarity, which means y'all cannot connect them backwards. If a button doesn't work make sure you've got a good electrical connection with the Maker Tape.

  2. The "YX5300 MP3 Player Module" is a common audio board that can be found on Amazon and other web sites. It has four pins we'll need to connect to our micro:bit using F/F Jumper Wires. Connect RX from the Audio Player to Pin 13 on the Bit Board. Connect TX from the Audio Player to Pin 14 on the Bit Board.

    • The "YX5300 MP3 Player Module" is a mutual audio board that can exist constitute on Amazon and other web sites. Information technology has four pins we'll demand to connect to our micro:fleck using F/F Jumper Wires.

    • Connect RX from the Audio Actor to Pin 13 on the Scrap Board.

    • Connect TX from the Sound Player to Pin 14 on the Bit Board.

    • Connect VCC to any pin in the + (positive) row.

    • Connect GND to any pin in the - (negative) row.

    • The Bit Board will provide power to the Audio Board using the + and - pins and command it using the TX (transmit) and RX (receive) pins.

  3. The audio player has a 1/8" stereo jack suitable for headphones or computer speakers. Any powered computer speakers with a 1/8" stereo plug should work fine. If you use an unpowered speaker it will still work, but be much quieter. You can also use headphones if you prefer. If you use an unpowered speaker it will still work, but be much quieter. You can also use headphones if you prefer.

    • The sound player has a 1/eight" stereo jack suitable for headphones or computer speakers. Whatsoever powered computer speakers with a 1/viii" stereo plug should work fine.

    • If yous use an unpowered speaker it will still work, but exist much quieter. Yous can also use headphones if you adopt.

  4. You will need audio files. The module will work with MP3 files and WAV files. The files must be named appropriately, and placed in folders that are name appropriately. Notice that folder 01 has a file named 001xxx.mp3 - This is the naming structure you'll need to use so the audio module can recognized the files.

    • You will need audio files. The module will work with MP3 files and WAV files.

    • The files must be named appropriately, and placed in folders that are name appropriately.

    • Notice that folder 01 has a file named 001xxx.mp3 - This is the naming construction you lot'll need to use so the sound module tin recognized the files.

    • The SD card will demand to be formatted as an MS-DOS (FAT32) volume for the audio histrion to recognize it.

    • If you are using macOS information technology is a good thought to reformat the SD Card using disk utility each time y'all load a new gear up of files.

    • If y'all are not using macOS you lot tin can skip this step... If y'all are using macOS keep reading!

    • macOS creates some invisible files chosen "dot underscore' files, simply these files tin confuse the audio role player when they are found on the SD Card. Nosotros have a solution for that...

    • Showtime, each fourth dimension you load a new set up of sound files, it is recommended to reformat the SD Card using Disk Utility. Just erase the SD Carte and make sure you cull MS-DOS (FAT32) format. One time erased, copy your new sound files to the SD Carte.

    • You may notwithstanding take the "invisible files" trouble, and then if the wrong sounds are playing or the module is doing something unexpected, download DotClean from GitHub and follow the instructions (as well shown in the video for this step.)

    • Download DotClean for macOS: https://github.com/raster/DotClean

  5. Connect a USB cable to the micro:bit and then plug it into your computer.

    • Connect a USB cable to the micro:scrap and so plug it into your reckoner.

    • We'll exist using makecode.microbit.org to plan our board. It uses a simple drag and drop cake interface.

    • We're going to load the post-obit lawmaking for our MP3 Audio Player programme: https://makecode.microbit.org/_VoJ8UrC9F...

    • Our code is pretty uncomplicated. Nosotros're setting upwards viii pins to work with buttons, and configuring the pins for the audio actor. We then check for a button press and play the appropriate sound files.

  6. You can power the micro:bit via a USB cable or by plugging a 2 AAA Battery Pack into the Bit Board. Make sure you've got your SD Card in the audio board, make sure you've speakers plugged into the audio board, turn on your speakers... and press a button! Did you hear a sound? If so, it works! Check all the buttons... do they each play a sound? Good!

    • You can power the micro:chip via a USB cablevision or by plugging a ii AAA Battery Pack into the Bit Board.

    • Brand sure y'all've got your SD Card in the audio lath, brand sure you've speakers plugged into the audio board, plough on your speakers... and printing a button!

    • Did you hear a sound? If and so, it works! Check all the buttons... do they each play a sound? Good!

    • If annihilation doesn't work as expected, double-check all of your connections, and re-read the steps for the SD Card. Information technology tin can be a bit tricky the beginning time you gear up the sound files.

Fastened Documents

Embed this guide

Choose a size and copy the lawmaking below to embed this guide as a small widget on your site / forum.

Preview

DOWNLOAD HERE

Posted by: wyantcamem1938.blogspot.com