Introduction: Linkit One Play Music

The Linkit One is a cool microcontroller and all my projects are based on it, but did you know the Linkit One is capable of playing music songs from an SD card. In this instructable I'm going to show you how to make your linkit one play songs, also read my previous instructable where I show you how to play Christmas tunes on a linkit One. For this instructable I will be using the 3.5mm Jack to get the music output and not a digital pin.

Step 1: Requirements

Here is a list of all the electronic components required to get started with the circuit.

LinkIt One

Headphones

Micro USB Cable

Micro SD Card

Step 2: Code

Upload the code to the Linkit one on the 2nd port that says Linit one in the arduino IDE. Make sure you enter your song names in the code before uploading the code to the board.

#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: Songs

Now get an empty SD card and Load the songs into it, make sure you do not have any large file on it as it will cause the Linkit One to freeze. You can also add in multiple songs and then upload the code to the Linkit One with the song names.

Step 4: Playback

Connect a pair of head phones and then power on your linkit one now you should have your linkit one play the songs you uploaded. While this might be as great as an Raspberrry pi making a arduino like device play songs is a cool thing and might make a bigger project like a music playing robot.

Comments

About This Instructable

1,139views

23favorites

License:

Bio: Eat*Sleep*Code Repeat
More by Prem67:Build a Proximity Sensor with the Linkit OneLinkit One Play MusicLinkit One Oscilloscope
Add instructable to: