Simple Audio Player




About: Linux n00b, hacker

The MediaTek LinkIt ONE board is truly jam-packed with goodies, with features like GPS, GSM, GPRS, WiFi and BLE, all of which are on a board with the form factor of an Arduino UNO. What really left me (and many others) so impressed was that this board costs only about $60, and one receives an Li-ion battery and some antennas along with it too! Yayy, we can't wait to start making stuff!

To be honest, what really made me excited about this board was that it has Audio out (a 4-pin AUX pin connector built-in). Why? You see, phones aren't allowed in my school, so I wanted to make a audio player from scratch which I could take to school. As the audio player would be bare circuit boards, I could easily pass it off as a physics project, say.

The Linkit ONE is the perfect board for this purpose; it already has a built-in SD card socket and an Audio Out, so very few external components are required. In addition to that, there are code examples which explain how to use this feature.

Features of Audio Player:

  • Can play .wav, .mp3, .aac, and .amr files
  • Can use SD card upto 32GB
  • Informative LCD screen
  • Minimal external components, so easy to use
  • 1050mAh battery (with built in charger)
  • Easy to make
  • Portable
  • Looks like any other electronics project (if you go to a school where devices aren't allowed, you can take this Audio player along and not get caught!)


Step 1: Project Details and Materials Required...

Prerequesites: You should have your Mediatek Linkit ONE set up and ready to upload sketches to.

Cost: ~$75 (including Linkit board, which is about $60)

Difficulty: Easy

Time Required: ~ 1 hour

Bill Of Materials:

  1. Linkit One board (Seeed)
  2. Li-ion battery (The linkit one box includes one)
  3. General purpose PCB
  4. Male headers
  5. 5 push buttons
  6. Grove I2C RGB LCD (Seeed)
  7. Earphones or headphones or an AUX speaker (buy one here)

Step 2: Solder the Buttons...

There are 5 buttons in all, each for Play/Pause, Next song, Previous song, Volume Up and Volume Down. The diagram above shows the arrangement of the buttons on the PCB along with the connections. Feel free to change the pin configurations (though remember to modify the code accordingly); here are my connections:

  • prevPin = 7;
  • playPin = 5;
  • nextPin = 3;
  • volumeUpPin = 4;
  • volumeDownPin = 6;
  • Step 3: Connect the LCD Screen...

    What's great about the Linkit board is that it already has a grove 4 pin connector built-in, to which we can directly connect the LCD. No shield required!

    Step 4: Connect the Button PCB...

    Here are the pin connections again:

  • prevPin = 7;
  • playPin = 5;
  • nextPin = 3;
  • volumeUpPin = 4;
  • volumeDownPin = 6;See the above picture and its tags for help.
  • Step 5: Add Songs to a MicroSD Card...

    Convert The Songs to .mp3, .wav, or .aac (if it isn't already)

    1. Download an audio converter (like Media Human converter)
    2. Select songs to convert
    3. Convert songs to .mp3 (constant bitrate), .wav (though this creates HUGE files), or .aac (recommended, best sound quality)

    Transfer songs to SD card:

    Make sure all the songs aren't in a folder.

    Step 6: Insert the SD Card...

    Step 7: Upload the Code!

    Below are two attachments: the main .ino file, and a .h header file. Download both of them, and then place them in a single folder names my_player. When you open this code, two tabs containing each file should be visible. Change the button pins if required.

    Select the Linkit ONE board and correct COM port, and upload!

    Note: The board sends debug messages on the serial COM port, which may be helpful if you are facing problems.

    Step 8: Connect Battery...

    Connect the battery as shown above. See the tags of the image to see how to switch on/off and charge the board.

    Step 9: Connect Earphones...

    Step 10: Play!

    I don't know if I should be surprised, but the audio quality delivered by the LinkIt is pretty damn good! The screen periodically shows the volume level and battery percentage (because the screen is too small to display everything at once).

    I hope you enjoy making stuff with your Linkit! Any comments, questions and suggestions are welcome!



      • Party Challenge

        Party Challenge
      • Colors of the Rainbow Contest

        Colors of the Rainbow Contest
      • Woodworking Contest

        Woodworking Contest

      9 Discussions


      1 year ago

      This is a really cool and cute idea! It is a fun idea to do if you don't want to purchase a mp3 player of your own. It makes listening to the music worth it, as you've put in the effort to make this yourself. I like the amount of pictures, but as a recent comment suggested, I would also love to see a video of how of how you made it! Great idea!!!


      3 years ago

      is there anyway you could take a video of you putting it together? I'm really sorry for all the inconvenience but I really want to try this!


      3 years ago

      So you soldered the buttons onto the pcb? Sorry again I am new but trying to learn!


      3 years ago

      Hi I'm brand new to all of this and your project seemed really cool. I was going to try and upload the code to my linkit one and got this error message

      Arduino: 1.6.7 (Mac OS X), Board: "LinkIt ONE"

      Warning: platform.txt from core 'MediaTek ARM7 EJ-S (32-bits) Boards' contains deprecated"{compiler.path}{}" {} "{build.path}/{archive_file}" "{object_file}", automatically converted to"{compiler.path}{}" {} "{archive_file_path}" "{object_file}". Consider upgrading this core.

      In file included from sketch/F9Q9ZNTIHXB58SB.ino.cpp:1:0:

      /Users/DanielDavis/Library/Arduino15/packages/LinkIt/hardware/arm/1.1.17/cores/arduino/Arduino.h:38:19: fatal error: vmdcl.h: No such file or directory

      #include "vmdcl.h"


      compilation terminated.

      exit status 1

      Error compiling.

      Any ideas on how to fix?

      1 reply

      Reply 3 years ago

      I've had a simliar error. You may have to try reinstalling the linkit one ide. FOllow my guide this time.


      3 years ago

      good project! nice bit of pink Floyd:D


      3 years ago

      Nice idea for getting past school rules. ;) I wish the Arduino could play audio... I've had a similar idea, but using a vintage sound chip, and instead of mp3s and WAVs, using MIDI files, basically a portable midi synth based of a vintage sound chip. Haven't gotten around to it yet, since I'm still getting familiar with using the chips.

      2 replies

      Reply 3 years ago

      im pretty sure there are ways to play audio using a simple arduino uno using PWM and an SD card breakout... Google it! Also, I had this idea of buying a raspberry pi 2 for the purpose (only $25); it has an aux jack and I bet you can easily play quality audio from it by looking up tutorials on Google!


      Reply 3 years ago

      Probably. I've played around with using PWM and the tone function to try to simulate audio coming from my computer that it read on the analog pins, but there's probably a better way to do it. My way certainly wouldn't work as an audio player! It was interesting to try and recognize music though. x)