[riot-notifications] [RIOT-OS/RIOT] drivers/dfplayer: New driver for the DFPlayer Mini MP3 player (#12271)

Marian Buschsieweke notifications at github.com
Wed Sep 18 13:12:26 CEST 2019

### Contribution description

This PR adds a driver for the UART controlled MP3 player module sold as "DFplayer Mini" for about 2€ and less. The shell command `dfplayer` is provided as well (when both modules `shell_commands` and `dfplayer` are used). The new test application in `tests/driver_dfplayer` provides exactly this.

### Testing procedure

1. Get an SD card sized 32GB or less. (Those come with a DOS partition table with exactly one partition spanning the whole storage and formatted as FAT32. This is what the device needs, in case you manually changed the partition table or the file system.)
2. Store some MP3 files on it using any (or all) of the following naming schemes:
    1. Files with three digit filenames (leading zeors) in two digit folder names (`"01/001.mp3"` to `"99/255.mp3"`)
    2. Files with four digit filenames stored in the folder MP3 (`"MP3/0001.mp3"` to `"MP3/9999.mp3"`)
    3. Files with four digit filenames stored in the folder ADVERT (`"ADVERT/0001.mp3"` to `"ADVERT/9999.mp3"`)
3. Plug the SD card into the DFPlayer Mini, connect it via UART (3.3V logic level) to your board
4. Connect the DFPlayer Mini to a speaker using either
    1. The SPK+ and SPK- pins to directly drive a passive speaker (mono) without the need of an amplifier. (An internal 3W amplifier is used.)
    2. The ADC_L, ADC_R and GND pins to directly drive a headphone, to directly connect to the AUX input via an audio Jack of your home entertainment system, or two to (stereo) speakers using a 2-channel amplifier
5. Compile, flash, and run `tests/driver_dfplayer` and use the `dfplayer` shell command to play music.

### Issues/PRs references

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * drivers: Added doc group drivers_multimedia
  * sys/auto_init: Added auto-init for multimedia
  * drivers: Added driver for the DFPlayer MP3 player
  * sys/shell: Added shell command "dfplayer"
  * tests: Added test for the dfplayer driver

-- File Changes --

    M drivers/Makefile.dep (6)
    M drivers/Makefile.include (4)
    A drivers/dfplayer/Makefile (1)
    A drivers/dfplayer/dfplayer.c (238)
    A drivers/dfplayer/dfplayer_internal.c (479)
    A drivers/dfplayer/include/dfplayer_constants.h (188)
    A drivers/dfplayer/include/dfplayer_implementation.h (267)
    A drivers/dfplayer/include/dfplayer_internal.h (214)
    A drivers/dfplayer/include/dfplayer_params.h (69)
    A drivers/dfplayer/include/dfplayer_types.h (158)
    M drivers/doc.txt (6)
    A drivers/include/.dfplayer.h.swo (0)
    A drivers/include/dfplayer.h (785)
    M sys/Makefile.dep (7)
    M sys/auto_init/Makefile (4)
    M sys/auto_init/auto_init.c (10)
    A sys/auto_init/multimedia/Makefile (3)
    A sys/auto_init/multimedia/auto_init_dfplayer.c (50)
    M sys/include/auto_init.h (8)
    M sys/shell/commands/Makefile (3)
    A sys/shell/commands/sc_dfplayer.c (604)
    M sys/shell/commands/shell_commands.c (7)
    A tests/driver_dfplayer/Makefile (13)
    A tests/driver_dfplayer/main.c (96)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190918/65d32fde/attachment.htm>

More information about the notifications mailing list