GY-63_MS5611/libraries/MiniMP3
2023-11-14 11:16:33 +01:00
..
.github 0.1.2 MiniMP3 2023-08-31 22:07:39 +02:00
examples 0.1.3 MiniMP3 2023-11-14 11:16:33 +01:00
test 0.1.2 MiniMP3 2023-08-31 22:07:39 +02:00
.arduino-ci.yml 0.1.2 MiniMP3 2023-08-31 22:07:39 +02:00
CHANGELOG.md 0.1.3 MiniMP3 2023-11-14 11:16:33 +01:00
keywords.txt 0.1.2 MiniMP3 2023-08-31 22:07:39 +02:00
library.json 0.1.3 MiniMP3 2023-11-14 11:16:33 +01:00
library.properties 0.1.3 MiniMP3 2023-11-14 11:16:33 +01:00
LICENSE 0.1.2 MiniMP3 2023-08-31 22:07:39 +02:00
MiniMP3.cpp 0.1.3 MiniMP3 2023-11-14 11:16:33 +01:00
MiniMP3.h 0.1.3 MiniMP3 2023-11-14 11:16:33 +01:00
README.md 0.1.2 MiniMP3 2023-08-31 22:07:39 +02:00

Arduino CI Arduino-lint JSON check GitHub issues

License: MIT GitHub release PlatformIO Registry

MiniMP3 Library

Arduino library for DFRobotics MP3 player and compatibles.

Description

Experimental

MiniMP3 is an Arduino library to control the DFRobotics MP3 player and compatibles. Goal is to have basic control of the device via hardware Serial or software Serial.

If you need complete control including all kinds of feedback events like "card inserted" you need to use the DFRobotics library.

This library is work in progress.

Schema

               MINI MP3
            +-----__-----+
       VCC  |            |  BUSY
        RX  |            |  USB-
        TX  |            |  USB+
     DAC_R  |            |  ADKEY_2
     DAC_L  |  +------+  |  ADKEY_1
     SPK_1  |  |      |  |  IO_2
       GND  |  |  SD  |  |  GND
     SPK_2  |  | CARD |  |  IO_1
            +--+------+--+

When connecting to a 5V MCU, you need to add a 1K resistor between the
Serial TX and RX as the MiniMP3 is 3V3. Otherwise a big HUM.

Interface

#include "MiniMP3.h"

Constructor

  • MiniMP3(Stream * stream = &Serial) Can be used with software or hardware Serial. Default stream is Serial.
  • void reset() reset the player.
  • void lowPower() set the player in low power mode.

Basic controls

  • void play(uint16_t track) plays SD:/MP3/track.mp3
  • void next() go to next track.
  • void prev() go to previous track.
  • void pause() pause playing
  • void stop() stop playing.

Volume

  • void volume(uint16_t vol = 0) set volume range 0..30.
    • default volume off.
  • void volumeUp() increase volume one step.
  • void volumeDown() decrease volume one step.
  • void equalizer(uint8_t mode = MP3_EQ_NORMAL)
    • Set equalizer mode, see options below.

Equalizer modi

Mode value notes
MP3_EQ_NORMAL 0 default
MP3_EQ_POP 1
MP3_EQ_ROCK 2
MP3_EQ_JAZZ 3
MP3_EQ_CLASSIC 4
MP3_EQ_BASS 5

Future

Must

  • improve documentation

Should

  • test
  • keep it minimal.

Could

  • add playBack modi.
  • test different models
  • add examples
    • implement playlists
    • implement "skip_search" (play 10 seconds of each file).
    • implement randomizer
  • add unit tests (possible?)
  • get current track
  • last track
  • last mode

Wont

  • implement query commands

Support

If you appreciate my libraries, you can support the development and maintenance. Improve the quality of the libraries by providing issues and Pull Requests, or donate through PayPal or GitHub sponsors.

Thank you,