Skip to content

Latest commit

 

History

History
58 lines (46 loc) · 1.1 KB

File metadata and controls

58 lines (46 loc) · 1.1 KB

DFPlayer

This is an espruino module for DFPlayer mini This module uses Software Serial

i tested on ESP8266 NodeMCU.

usage

require the module, and set your tx and rx pins.

  var dfplayer = require("DFPlayer");
  var mp3 = dfplayer.setup(NodeMCU.D2, NodeMCU.D1); //tx, rx

Then you can call the method you want

play a song

    mp3.play();

Available functions:

  • Play
  • Next
  • SetEQ
  • Reset
  • Pause
  • Resume
  • SetMode
  • Standby
  • SetGain
  • QueryEQ
  • Previous
  • SetTrack
  • SetVolume
  • SetSource
  • QueryMode
  • SetFolder
  • RepeatPlay
  • QueryVolume
  • QueryStatus
  • IncreaseVolume
  • DecreaseVolume
  • QuerySoftwareVersion
  • QueryTotalFilesOnUDisk
  • QueryTotalFilesOnFlash
  • QueryTotalFilesOnTFCard
  • QueryCurrentTrackOnUDisk
  • QueryCurrentTrackOnFlash
  • QueryCurrentTrackOnTFCard

Contributing

feel free to improve the code