Arduino Music Player Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld
Arduino Music Player Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld

Music Player shield helps you play, pause, seek and stop music from your own created list of music tracks.

This shield is one of the special shields. Special shields allows your Arduino board to use some capabilities your smartphone can do, like playing music, taking a picture, getting notifications, accessing the clock data and using the touch screen for various functions.Learn more from the special shields tutorial.

Music player library turns your smartphone to an MP3 player where you can control it using your Arduino board.

 

Adding #define CUSTOM_SETTINGS along with #define INCLUDE_MUSIC_PLAYER_SHIELD is a key that will let you unlock the Music Player shield only amongst all shields and prevent 1Sheeld library from eating your memory specially for UNO board.

 

Note

For Android M(6) or greater, there are permissions to be granted before using the Data Logger shield, please make sure to grant the permissions or else it may affect the application’s performance.

 

void stop(void)

Stops the track.

 

SYNTAX
MusicPlayer.stop();

 

RETURNS
None.

 

PARAMETERS
None.

 

USAGE
MusicPlayer.stop();

 

void play(void)

Plays the first track from your tracks list.

 

SYNTAX
MusicPlayer.play();

 

RETURNS
None.

 

PARAMETERS
None.

 

USAGE
MusicPlayer.play();

 

void play(const char *)

Plays certain track given its name.(feature currently supported by IOS app and soon will be for Android)

 

SYNTAX
MusicPlayer.play(trackName);

 

RETURNS
None.

 

PARAMETERS
Takes const char array holding track name to play it.

 

USAGE
MusicPlayer.play("In The End");

 

void play(int)

Plays certain track given its index in the list.(feature currently supported by IOS app and soon will be for Android)

 

SYNTAX
MusicPlayer.play(trackIndex);

 

RETURNS
None.

 

PARAMETERS
Takes an integer holding track index to play it.(indexing starts from 0)

 

USAGE
MusicPlayer.play(2);

 

void pause(void)

Pauses the current playing track.

 

SYNTAX
MusicPlayer.pause();

 

RETURNS
None.

 

PARAMETERS
None.

 

USAGE
MusicPlayer.pause();

 

void next(void)

Plays the next track in list.

 

SYNTAX
MusicPlayer.next();

 

RETURNS
None.

 

PARAMETERS
None.

 

USAGE
MusicPlayer.next();

 

void previous(void)

Plays previous track in list.

 

SYNTAX
MusicPlayer.previous();

 

RETURNS
None.

 

PARAMETERS
None.

 

USAGE
MusicPlayer.previous();

 

void seekForward(byte)

Seeks the track forward to a certain period given.

 

SYNTAX
MusicPlayer.seekForward(seekingPercentagePeriod);

 

RETURNS
None.

 

PARAMETERS
Takes a byte holding seeking value from 0 to 100.

 

USAGE
MusicPlayer.seekForward(50);

 

void seekBackward(byte)

Seeks the track backward to a certain period given.

 

SYNTAX
MusicPlayer.seekBackward(seekingPercentagePeriod);

 

RETURNS
None.

 

PARAMETERS
Takes a byte holding seeking value from 0 to 100.

 

USAGE
MusicPlayer.seekBackward(50);

 

void setVolume(byte)

Sets the volume of the device.

 

SYNTAX
MusicPlayer.setVolume(volumeLevel);

 

RETURNS
None.

 

PARAMETERS
Takes a byte holding volume value from 0 to 10.

 

USAGE
MusicPlayer.setVolume(8);