Introduction: Linkit One - Music Player

Picture of Linkit One - Music Player

In the last instructable I showed you how to get started with the Linkit One and how to set up your Arduino to program the arduino IDE. The Linkit one certainly has more possibilities than just blink an LED, it has on board 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. Before jumping right into this instructable I would recommend you to check out my previous Instructable to get all the things setup for this project.

Step 1: Tools and Components

Picture of Tools and Components

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

Picture of 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_link...

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.

#include #include
#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: SD Card

Picture of 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: Plugin in Earphones

Picture of Plugin 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.

Step 5: Going Further

Picture of Going Further

Hope you had fun building the Media player, In a future Instructable I will show you how to add a 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.

Comments

paulm171 (author)2017-08-27

Great project, well documented. Could you possibly do a future linkit one instructable that includes the onboard Bluetooth. I see that mostly people use hc05/06 module instead...

About This Instructable

509views

15favorites

License:

Bio: IoT Related Projects
More by tinkerproject:Tasty Biscuit LaddooSpicy Corn CurryPhulka - Fluffy Roti Breads
Add instructable to: