Introduction: Linkit One - Music Player

About: " Work until you no longer have to introduce yourself " Show some love on Instagram @makers_bee & Motivate me on YouTube @MakersBee

The Linkit one certainly has more possibilities than just blink an LED, it has onboard WiFi, GSM, GPRS and lots more. It also has a 3.5mm audio jack and an SD Card so that got me thinking if you could play media from your Linkit One and turns out you can so in this instructable I'm going to show you How to convert your Linkit One to a media player.

Step 1: Components Required

Here is what you will need to get started with this project

  • Linkit One
  • Micro USB Cable
  • A pair of Earphones with 3.5mm Jack
  • Micro SD Card

Step 2: Uploading Code

To upload programs to Linkit One you will need the Arduino IDE, you can download it from Arduino official website. And after you download it you need to navigate to Preferences in the Arduino File Menu.

In Additional Boards, Manager URLs enter :

http://download.labs.mediatek.com/package_mtk_linkit_index.json

Then go to the tools and select the board manager After that search for Linkit One and you should have it working.

Then copy the code from below and then upload it to the board, make sure you have the right COM port and board selected before uploading the code.

#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);

}

Step 3: Inserting SD Card

Load up a few MP3 files or Wav files on to your SD card and then plug it into you Linkit One, make sure you enter your file name in the code from the previous step.

play('Your File name');

Step 4: Plug-in Earphones

Now that you have everything ready before you power on the board plug in a pair of headphones and set the on board switch from SPI to SD. And you should here your music play when you switch on your Linkit One.

Going Further...


Hope you had fun building the Media player, In the future Instructable I will show you how to add an IR remote to control the song being played and have more Control options for the Media player.

If you have any queries, feel free to leave a comment below or PM me and I would try to help you.