Linkit ONE Music Player

by Diwask in Circuits > Audio

3569 Views, 47 Favorites, 0 Comments

Linkit ONE Music Player

DSC00193.JPG

This instructable will guide you to play and MP3 file on linkit one through a micro SD card. This projects makes use of the Audio jack and SD card reader features of the Mediatek Linkit ONE board.

So let's begin...

Requirements

DSC00170.JPG
DSC00187.JPG
DSC00169.JPG
DSC00167.JPG
DSC00172.JPG

You will require the following parts:

  • Linkit one
  • Linkit one battery
  • Memory card with songs loaded
  • Speaker or earphones

That's it!

Insert Memory Card and Connect Battery

DSC00180.JPG
DSC00181.JPG

Insert your memory card in the SIM/ Micro SD combo linkit one. Your SD card should be formatted first and then songs should be loaded.

Then connect the lithium battery to the socket present on linkit one.

Upload Code

Upload this code to your linkit one with the switches in SPI and UART positions. Change the "define" line with the file name you want to play.

#include <LSD.h>
#include <LAudio.h> #define file_name (char *)"xyz.mp3" // change this to the song you want to play

void play(char * filename) { LAudio.setVolume(5); LAudio.playFile(storageSD, filename); Serial.print("Playing: "); Serial.println(filename); delay(5000); }

void setup() { Serial.begin(9600); while (!Serial); Serial.println("Initializing SD Card..."); LSD.begin(); Serial.println("Card Initialized!"); }

void loop() { play(file_name); }

Downloads

Connect Speakers or Earphones and Play It!

DSC00192.JPG

Now connect your speakers of earphones to the 3.5mm audio jack on linkit one. Set the switches to MS, SD and BAT positions.

You will now be able to hear the song which you mentioned in the code