I am trying to find a library or code for the following MP3 Music player to interact by UART (using IO0, IO1 pins).
Unfortunately, I couldn't find any code related to this particular player. As I am new to Arduino programming, I couldn't find a way to generate the command with the specifications they have given on the product page.
Also, I am not sure about the 3 switches found on the red box on the board.
Any help or guidance is much appreciated. Thanks in advance.
Surely, the fundamental Arduino code you require is
Serial.print(variable); and that is about all. You can't possibly be complaining about lack of documentation. Just make sure you connect your wires properly Tx>RX and Rx<Tx.
Many thanks for your help guys. I tried the library mentioned by guix and it worked perfectly fine. Also, I took into consideration of Nick_pyner and wrote my own code for various functions for the player. Honestly, it was fun and still, I want to develop the full functionality of the player myself. Anyhow, I thought of sharing my code here. If you find any better improvements to the code, please let me know.
CardozaDYPlayer.h
#ifndef CDYPlayer
#define CDYPlayer
#include "Arduino.h"
class CardozaDYPlayer {
private:
Stream* _serial_connection;
byte _start_byte=0xAA;
int _volume=15;
int _current_song;
int _number_of_songs;
int _equalizer;
void _sendCommand(byte command, byte data_length=0x00, byte data=0x00);
public:
CardozaDYPlayer(Stream& serial_connection);
void play();
void pause();
void stop();
void previous();
void next();
void setVolume(int volume);
int getVolume();
void increaseVolume();
void decreaseVolume();
int getCurrentSong();
int getNumberOfSongs();
void setEqualizer(int equalizer);
};
#endif