{"id":9040,"date":"2020-10-18T12:35:05","date_gmt":"2020-10-18T12:35:05","guid":{"rendered":"https:\/\/wolles-elektronikkiste.de\/arduino-controlled-dfplayer-mini"},"modified":"2023-12-04T20:23:09","modified_gmt":"2023-12-04T20:23:09","slug":"arduino-controlled-dfplayer-mini","status":"publish","type":"post","link":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini","title":{"rendered":"Arduino controlled DFPlayer Mini"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">About the post<\/h2>\n\n<p>In <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/mp3-player-yx5300\" target=\"_blank\" rel=\"noopener noreferrer\">my last post<\/a> I had explained how to deal with the YX5300. In this post, I will focus on another MP3 player, the DFPlayer Mini, and how to control it with the Arduino.<\/p>\r\n<ul>\r\n \t<li>Technical data and pinout<\/li>\r\n \t<li>SD card file structure<\/li>\r\n \t<li>Circuit for serial control with Arduino<\/li>\r\n \t<li>The DFRobotDFPlayerMini library<\/li>\r\n \t<li>A sketch with menu navigation<\/li>\r\n \t<li>Control via pushbuttons<\/li>\r\n \t<li>DFPlayer Mini vs. YX5300 module<\/li>\r\n<\/ul>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini-1024x548.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"548\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini-1024x548.webp\" alt=\"\" class=\"wp-image-19609\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini-1024x548.webp 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini-300x161.webp 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini-768x411.webp 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini-1536x823.webp 1536w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini-1320x707.webp 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini.webp 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Small but mighty, the DFPlayer Mini<\/figcaption><\/figure>\n\n<h2 class=\"wp-block-heading\">Specifications \/ Features of the DFPlayer Mini<\/h2>\n\n<h3 class=\"wp-block-heading\">Overview<\/h3>\n\n<p>The DFPlayer Mini is available for 5-10 euros from <a href=\"https:\/\/smile.amazon.de\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon<\/a> or other online shops. Very impressive is the small size of the module, because it is hardly larger than the Micro SD card slot. No less impressive I find that there is even space for an amplifier on this device, so that you can connect loudspeakers up to 3 watts directly. A data sheet for the DFPlayer Mini can be found on the internet e.g. <a href=\"http:\/\/www.picaxe.com\/docs\/spe033.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>. Here are some basic data:<\/p>\r\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Power supply <\/td><td>3.2 &#8211; 5.0 V<\/td><\/tr><tr><td>Current consumption (standby)<\/td><td>~ 20 mA<\/td><\/tr><tr><td>Supported file types<\/td><td>MP3 and WAV<\/td><\/tr><tr><td>Supported SD cards<\/td><td>Micro SD(HC) up to 32 GB<\/td><\/tr><tr><td>Format<\/td><td>FAT16 \/ FAT 32<\/td><\/tr><tr><td>Communication <\/td><td>Seriell RX\/TX, baud rate: 9600<\/td><\/tr><tr><td>USB port<\/td><td>USB 2.0 (Flashdrive \/ PC)<\/td><\/tr><tr><td>Audio outputs<\/td><td>Loudspeaker &#8211; up to 3W (amplifier on board)<br\/>DAC (for headphones or amplifiers)<br\/><\/td><\/tr><\/tbody><\/table><\/figure>\n\n<h3 class=\"wp-block-heading\">Pinout<\/h3>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Anschlussschema_DFPlayer.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"476\" height=\"350\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Anschlussschema_DFPlayer.jpg\" alt=\"Pinout and pin functions of the DFPlayer Mini\" class=\"wp-image-1173\" style=\"width:238px;height:175px\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Anschlussschema_DFPlayer.jpg 476w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Anschlussschema_DFPlayer-300x221.jpg 300w\" sizes=\"auto, (max-width: 476px) 100vw, 476px\" \/><\/a><figcaption class=\"wp-element-caption\">Pinout of the DFPlayer Mini<\/figcaption><\/figure>\n<\/div>\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Anschluesse_DFPlayer.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"929\" height=\"732\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Anschluesse_DFPlayer.webp\" alt=\"\" class=\"wp-image-19611\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Anschluesse_DFPlayer.webp 929w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Anschluesse_DFPlayer-300x236.webp 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Anschluesse_DFPlayer-768x605.webp 768w\" sizes=\"auto, (max-width: 929px) 100vw, 929px\" \/><\/a><\/figure>\n\n<p>It should be noted that you have to put a 1 kOhm resistor before the RX input, otherwise you produce a very unsightly, loud hum.&nbsp;<\/p>\r\n<p>The Adkeyx and IOx connectors are a pretty ingenious thing that allow you to control the DFPlayer Mini largely with buttons. More on that further down.&nbsp;<\/p>\r\n\n<h3 class=\"wp-block-heading\">Folder and file structure of the SD card<\/h3>\n\n<p>The DFPlayer Mini expects the folder and file names in a specific format. The rules for file naming and the maximum number of files per directory depend on the type of directory.&nbsp;<\/p>\r\n\n<p>Note: If there are problems with the SD card, check if you have multiple partitions there. Sometimes there is a small boot partition on the SD card that can cause problems. How to fix the problem, I described <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/mp3-player-yx5300\" target=\"_blank\" rel=\"noopener noreferrer\">in my last post.<\/a> &nbsp;<\/p>\r\n\n<h4 class=\"wp-block-heading\">1. Main directory<\/h4>\n\n<p>The main folder of the SD card can contain up to 3000 wav or mp3 files. They must be called 0001.mp3 (or 0001.wav), 0002.mp3 &#8230;. 3000.mp3. Here, however, there is a strange issue that the files have to be copied in exactly the order of their names. If you tell the module it shall play 0001.mp3, but 0007.mp3 was copied first, then 0007.mp3 will be played. Personally, I would advise to not copy files to the main folder. Other folders do not have this issue.&nbsp;<\/p>\r\n\n<h4 class=\"wp-block-heading\">2. Standard folders<\/h4>\n\n<p>You can create up to 99 standard folders, which need to be named according to the scheme 01, 02, 03 &#8230;. 99. Up to 3000 files fit into each folder, but only the first 255 can be addressed directly via the serial commands. This means that a command like &#8220;play file number 627&#8221; is not possible in the standard directories. You would need to go there with &#8220;next&#8221; instructions, which is not very convenient. The file names must have the format 001xxxxx.mp3 (or wav), 002xxxxx.mp3, &#8230;.. 255xxxxx.mp3. &#8220;xxxxx&#8221; is freely selectable and can have more than the 5 digits indicated here. Spaces are also allowed.&nbsp;<\/p>\r\n\n<h4 class=\"wp-block-heading\">3. Special folder &#8220;MP3&#8221;<\/h4>\n\n<p>This folder must be named exactly as &#8220;MP3. &nbsp;  Up to 3000 files with the name 0001.mp3 (or wav), 0002.mp3, &#8230;.. 3000.mp3 fit into this folder. Unlike the main folder, all files are directly accessible and there are no problems with the order.&nbsp;<\/p>\r\n\n<h4 class=\"wp-block-heading\">4. Special folder &#8220;ADVERT&#8221;<\/h4>\n\n<p>The same rules apply as for the MP3 directory. The ADVERT directory has a special function. If you play a song from one of the other directories and call a file from the ADVERT directory, the former song is only interrupted. After the ADVERT play is finished, the former song continues. It&#8217;s like an advertisement and that&#8217;s how the name of the directory already suggests it. <\/p>\n\n<h2 class=\"wp-block-heading\">The circuit for serial operation <\/h2>\n\n<p>The circuit for operation via the serial interface is relatively simple. Note that a 1 kOhm resistor is put before the RX input of the DFPlayer module.<\/p>\r\n<p>Note: In my example circuit, I supply the DFPlayer with power from the Arduino. When using larger loudspeakers up to the max. 3 watts the total power consumption of the Arduino should be considered and not exceed 500 mA. &nbsp;<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Fritzing-1024x448.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"448\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Fritzing-1024x448.webp\" alt=\"\" class=\"wp-image-19613\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Fritzing-1024x448.webp 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Fritzing-300x131.webp 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Fritzing-768x336.webp 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Fritzing-1536x672.webp 1536w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Fritzing-1320x578.webp 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Fritzing.webp 1590w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">DFPlayer Mini control with the Arduino &#8211; the circuit<\/figcaption><\/figure>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Schaltung-1-1024x814.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"814\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Schaltung-1-1024x814.webp\" alt=\"\" class=\"wp-image-19615\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Schaltung-1-1024x814.webp 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Schaltung-1-300x238.webp 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Schaltung-1-768x610.webp 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Schaltung-1-1536x1221.webp 1536w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Schaltung-1-1320x1049.webp 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Schaltung-1.webp 1700w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">And this is what the circuit looks like on the breadboard<\/figcaption><\/figure>\n\n<h2 class=\"wp-block-heading\">Control via the library <br\/>DFRobotDFPlayerMini<\/h2>\n\n<p>The DFPlayer Mini control with Arduino is not difficult, as there are a number of libraries on Github. I use the <span style=\"display: inline !important; float: none; background-color: #ffffff; color: #191e23; cursor: text; font-family: 'Noto Serif'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;\"><a href=\"https:\/\/github.com\/DFRobot\/DFRobotDFPlayerMini\" target=\"_blank\" rel=\"noopener noreferrer\">DFRobotDFPlayerMini<\/a><\/span> library, but that doesn&#8217;t mean the others are bad. I just tried it first and stayed with it.&nbsp;<\/p>\r\n<p>As usual, you install the library by downloading the zip file and unpacking it in the &#8220;Arduino-libraries&#8221; folder. The included sample sketch &#8220;FullFunction.ino&#8221; provides a good overview of all functions. I modified it a little so that you can call the commands via the serial monitor. Here is the result:<\/p>\r\n\n<div class=\"scroll-paragraph-long\">\r\n<pre class=\"EnlighterJSRAW \" data-enlighter-group=\"FullFunction_Modified.ino\" data-enlighter-title=\"FullFunction_Modified.ino\" data-enlighter-language=\"cpp\">\/***************************************************\r\n Modified (by Wolfgang Ewald) Version of the FullFunction.ino example sketch of the DFRobotDFPlayerMini library:\r\n\u00a0\r\n\u00a0DFPlayer\u00a0-\u00a0A\u00a0Mini\u00a0MP3\u00a0Player\u00a0For\u00a0Arduino\r\n\u00a0&lt;https:\/\/www.dfrobot.com\/product-1121.html&gt;\r\n\u00a0\r\n\u00a0***************************************************\r\n\u00a0This\u00a0example\u00a0shows\u00a0the\u00a0all\u00a0the\u00a0function\u00a0of\u00a0library\u00a0for\u00a0DFPlayer.\r\n\u00a0\r\n\u00a0Created\u00a02016-12-07\r\n\u00a0By\u00a0[Angelo\u00a0qiao](Angelo.qiao@dfrobot.com)\r\n\u00a0\r\n\u00a0GNU\u00a0Lesser\u00a0General\u00a0Public\u00a0License.\r\n\u00a0See\u00a0&lt;http:\/\/www.gnu.org\/licenses\/&gt;\u00a0for\u00a0details.\r\n\u00a0All\u00a0above\u00a0must\u00a0be\u00a0included\u00a0in\u00a0any\u00a0redistribution\r\n\u00a0****************************************************\/\r\n\r\n\/***********Notice\u00a0and\u00a0Trouble\u00a0shooting***************\r\n\u00a01.Connection\u00a0and\u00a0Diagram\u00a0can\u00a0be\u00a0found\u00a0here\r\n&lt;https:\/\/www.dfrobot.com\/wiki\/index.php\/DFPlayer_Mini_SKU:DFR0299#Connection_Diagram&gt;\r\n\u00a02.This\u00a0code\u00a0is\u00a0tested\u00a0on\u00a0Arduino\u00a0Uno,\u00a0Leonardo,\u00a0Mega\u00a0boards.\r\n\u00a0****************************************************\/\r\n\r\n#include\u00a0\"Arduino.h\"\r\n#include\u00a0\"SoftwareSerial.h\"\r\n#include\u00a0\"DFRobotDFPlayerMini.h\"\r\n\r\nSoftwareSerial\u00a0mySoftwareSerial(10,11);\u00a0\/\/\u00a0RX,\u00a0TX\r\nDFRobotDFPlayerMini\u00a0myDFPlayer;\r\nvoid\u00a0printDetail(uint8_t\u00a0type,\u00a0int\u00a0value);\r\n\r\nvoid\u00a0setup()\r\n{\r\n\u00a0\u00a0mySoftwareSerial.begin(9600);\r\n\u00a0\u00a0Serial.begin(9600);\r\n\u00a0\u00a0\r\n\u00a0\u00a0Serial.println();\r\n\u00a0\u00a0Serial.println(F(\"DFRobot\u00a0DFPlayer\u00a0Mini\u00a0Demo\"));\r\n\u00a0\u00a0Serial.println(F(\"Initializing\u00a0DFPlayer\u00a0...\u00a0(May\u00a0take\u00a03~5\u00a0seconds)\"));\r\n\u00a0\u00a0\r\n\u00a0\u00a0if\u00a0(!myDFPlayer.begin(mySoftwareSerial))\u00a0{\u00a0\u00a0\/\/Use\u00a0softwareSerial\u00a0to\u00a0communicate\u00a0with\u00a0mp3.\r\n\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"Unable\u00a0to\u00a0begin:\"));\r\n\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"1.Please\u00a0recheck\u00a0the\u00a0connection!\"));\r\n\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"2.Please\u00a0insert\u00a0the\u00a0SD\u00a0card!\"));\r\n\u00a0\u00a0\u00a0\u00a0while(true);\r\n\u00a0\u00a0}\r\n\u00a0\u00a0Serial.println(F(\"DFPlayer\u00a0Mini\u00a0online.\"));\r\n\u00a0\u00a0printHelp();\r\n\u00a0\u00a0\r\n\u00a0\u00a0myDFPlayer.setTimeOut(500);\u00a0\/\/Set\u00a0serial\u00a0communictaion\u00a0time\u00a0out\u00a0500ms\r\n\u00a0\u00a0\r\n\u00a0\u00a0\/\/----Set\u00a0volume----\r\n\u00a0\u00a0myDFPlayer.volume(10);\u00a0\u00a0\/\/Set\u00a0volume\u00a0value\u00a0(0~30).\r\n\u00a0\/\/\u00a0myDFPlayer.volumeUp();\u00a0\/\/Volume\u00a0Up\r\n\u00a0\/\/\u00a0myDFPlayer.volumeDown();\u00a0\/\/Volume\u00a0Down\r\n\u00a0\u00a0\r\n\u00a0\u00a0\/\/----Set\u00a0different\u00a0EQ----\r\n\u00a0\u00a0myDFPlayer.EQ(DFPLAYER_EQ_NORMAL);\r\n\/\/\u00a0\u00a0myDFPlayer.EQ(DFPLAYER_EQ_POP);\r\n\/\/\u00a0\u00a0myDFPlayer.EQ(DFPLAYER_EQ_ROCK);\r\n\/\/\u00a0\u00a0myDFPlayer.EQ(DFPLAYER_EQ_JAZZ);\r\n\/\/\u00a0\u00a0myDFPlayer.EQ(DFPLAYER_EQ_CLASSIC);\r\n\/\/\u00a0\u00a0myDFPlayer.EQ(DFPLAYER_EQ_BASS);\r\n\u00a0\u00a0\r\n\u00a0\u00a0\/\/----Set\u00a0device\u00a0we\u00a0use\u00a0SD\u00a0as\u00a0default----\r\n\/\/\u00a0\u00a0myDFPlayer.outputDevice(DFPLAYER_DEVICE_U_DISK);\r\n\u00a0\u00a0myDFPlayer.outputDevice(DFPLAYER_DEVICE_SD);\r\n\/\/\u00a0\u00a0myDFPlayer.outputDevice(DFPLAYER_DEVICE_AUX);\r\n\/\/\u00a0\u00a0myDFPlayer.outputDevice(DFPLAYER_DEVICE_SLEEP);\r\n\/\/\u00a0\u00a0myDFPlayer.outputDevice(DFPLAYER_DEVICE_FLASH);\r\n\u00a0\u00a0\r\n\u00a0\u00a0\/\/----Mp3\u00a0control----\r\n\/\/\u00a0\u00a0myDFPlayer.sleep();\u00a0\u00a0\u00a0\u00a0\u00a0\/\/sleep\r\n\/\/\u00a0\u00a0myDFPlayer.reset();\u00a0\u00a0\u00a0\u00a0\u00a0\/\/Reset\u00a0the\u00a0module\r\n\/\/\u00a0\u00a0myDFPlayer.enableDAC();\u00a0\u00a0\/\/Enable\u00a0On-chip\u00a0DAC\r\n\/\/\u00a0\u00a0myDFPlayer.disableDAC();\u00a0\u00a0\/\/Disable\u00a0On-chip\u00a0DAC\r\n\/\/\u00a0\u00a0myDFPlayer.outputSetting(true,\u00a015);\u00a0\/\/output\u00a0setting,\u00a0enable\u00a0the\u00a0output\u00a0and\u00a0set\u00a0the\u00a0gain\u00a0to\u00a015\r\n\u00a0\u00a0\r\n\r\n}\r\n\r\nvoid\u00a0loop(){\r\n\u00a0\u00a0if(Serial.available()){\r\n\u00a0\u00a0\u00a0\u00a0readCommand();\r\n\u00a0\u00a0}\r\n\u00a0\r\n\u00a0\u00a0if\u00a0(myDFPlayer.available())\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0printDetail(myDFPlayer.readType(),\u00a0myDFPlayer.read());\u00a0\/\/Print\u00a0the\u00a0detail\u00a0message\u00a0from\u00a0DFPlayer\u00a0to\u00a0handle\u00a0different\u00a0errors\u00a0and\u00a0states.\r\n\u00a0\u00a0}\r\n}\r\n\r\nvoid\u00a0readCommand(){\r\n\u00a0\u00a0char\u00a0cmd\u00a0=\u00a0'\u00a0';\r\n\u00a0\u00a0int\u00a0value1,\u00a0value2\u00a0=\u00a00;\r\n\u00a0\u00a0cmd\u00a0=\u00a0Serial.read();\r\n\u00a0\u00a0value1\u00a0=\u00a0Serial.parseInt();\r\n\u00a0\u00a0value2\u00a0=\u00a0Serial.parseInt();\r\n\u00a0\r\n\u00a0\u00a0switch(cmd){\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'h':\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0printHelp();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'&gt;':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myDFPlayer.next();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'&lt;':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myDFPlayer.previous();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'p':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(value2\u00a0==\u00a00)\u00a0myDFPlayer.play(value1);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else\u00a0if(value1\u00a0!=\u00a00)\u00a0myDFPlayer.playFolder(value1,\u00a0value2);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'P':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(value2\u00a0==\u00a00)\u00a0myDFPlayer.playMp3Folder(value1);\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else\u00a0if(value1\u00a0!=\u00a00)myDFPlayer.playLargeFolder(value1,\u00a0value2);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'+':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myDFPlayer.volumeUp();\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'-':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myDFPlayer.volumeDown();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'v':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myDFPlayer.volume(value1);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'b':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myDFPlayer.pause();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0's':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myDFPlayer.start();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'z':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myDFPlayer.sleep();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'L':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(value1\u00a0==\u00a00)\u00a0myDFPlayer.enableLoopAll();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else\u00a0myDFPlayer.loopFolder(value1);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'l':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(value1\u00a0==\u00a00)\u00a0myDFPlayer.disableLoopAll();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else\u00a0myDFPlayer.loop(value1);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'A':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myDFPlayer.advertise(value1);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'a':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0myDFPlayer.stopAdvertise();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0'q':\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0if(value1\u00a0==\u00a01)\u00a0Serial.println(myDFPlayer.readState());\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else\u00a0if(value1\u00a0==\u00a02)\u00a0Serial.println(myDFPlayer.readVolume());\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else\u00a0if(value1\u00a0==\u00a03)\u00a0Serial.println(myDFPlayer.readEQ());\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else\u00a0if(value1\u00a0==\u00a04)\u00a0Serial.println(myDFPlayer.readFileCounts());\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else\u00a0if(value1\u00a0==\u00a05)\u00a0Serial.println(myDFPlayer.readFolderCounts());\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0else\u00a0if(value1\u00a0==\u00a06)\u00a0Serial.println(myDFPlayer.readCurrentFileNumber());\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0default:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(\"Ung\u00fcltiges\u00a0Kommando\");\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0}\r\n\r\n}\r\n\r\nvoid\u00a0printHelp(){\r\n\u00a0\u00a0Serial.println(\"DFPlayer\u00a0Commands:\");\r\n\u00a0\u00a0Serial.println(\"\u00a0h\u00a0-\u00a0help\");\r\n\u00a0\u00a0Serial.println(\"\u00a0&gt;\u00a0-\u00a0next\u00a0\");\r\n\u00a0\u00a0Serial.println(\"\u00a0&lt;\u00a0-\u00a0previous\");\r\n\u00a0\u00a0Serial.println(\"\u00a0p3\u00a0-\u00a0play\");\r\n\u00a0\u00a0Serial.println(\"\u00a0p3,5\u00a0-\u00a0play\u00a0folder\u00a03,\u00a0file\u00a05\");\r\n\u00a0\u00a0Serial.println(\"\u00a0P3,5\u00a0-\u00a0play\u00a0large\u00a0folder\u00a03,\u00a0file\u00a05\");\r\n\u00a0\u00a0Serial.println(\"\u00a0P3\u00a0-\u00a0play\u00a0file\u00a03\u00a0in\u00a0MP3\u00a0folder\");\u00a0\r\n\u00a0\u00a0Serial.println(\"\u00a0+\u00a0-\u00a0volume\u00a0up\");\r\n\u00a0\u00a0Serial.println(\"\u00a0-\u00a0-\u00a0volume\u00a0down\");\r\n\u00a0\u00a0Serial.println(\"\u00a0v10\u00a0-\u00a0set\u00a0volume\u00a0to\u00a010\");\r\n\u00a0\u00a0Serial.println(\"\u00a0b\u00a0-\u00a0Pause\");\r\n\u00a0\u00a0Serial.println(\"\u00a0s\u00a0-\u00a0start\u00a0\");\r\n\u00a0\u00a0Serial.println(\"\u00a0z\u00a0-\u00a0sleep\u00a0\");\r\n\u00a0\u00a0Serial.println(\"\u00a0L\u00a0-\u00a0enable\u00a0loop\u00a0all\");\r\n\u00a0\u00a0Serial.println(\"\u00a0l\u00a0-\u00a0disable\u00a0loop\u00a0all\");\r\n\u00a0\u00a0Serial.println(\"\u00a0L3\u00a0-\u00a0loop\u00a0folder\u00a03\");\r\n\u00a0\u00a0Serial.println(\"\u00a0l3\u00a0-\u00a0loop\u00a0file\u00a03\");\r\n\u00a0\u00a0Serial.println(\"\u00a0A3\u00a0-\u00a0advertise\u00a0file\u00a03\");\r\n\u00a0\u00a0Serial.println(\"\u00a0a\u00a0-\u00a0stop\u00a0advertise\u00a0\");\u00a0\r\n\u00a0\u00a0Serial.println(\"\u00a0qx\u00a0-\u00a0query\u00a0No.\u00a0x\");\r\n\u00a0\u00a0Serial.println(\"\u00a0\u00a0\u00a0\u00a0\u00a0x\u00a0=\u00a01\u00a0-\u00a0read\u00a0state\");\r\n\u00a0\u00a0Serial.println(\"\u00a0\u00a0\u00a0\u00a0\u00a0x\u00a0=\u00a02\u00a0-\u00a0read\u00a0volume\");\r\n\u00a0\u00a0Serial.println(\"\u00a0\u00a0\u00a0\u00a0\u00a0x\u00a0=\u00a03\u00a0-\u00a0read\u00a0equalizer\");\r\n\u00a0\u00a0Serial.println(\"\u00a0\u00a0\u00a0\u00a0\u00a0x\u00a0=\u00a04\u00a0-\u00a0read\u00a0file\u00a0counts\");\r\n\u00a0\u00a0Serial.println(\"\u00a0\u00a0\u00a0\u00a0\u00a0x\u00a0=\u00a05\u00a0-\u00a0read\u00a0current\u00a0file\u00a0number\");\r\n\u00a0\u00a0Serial.println(\"\u00a0\u00a0\u00a0\u00a0\u00a0x\u00a0=\u00a06\u00a0-\u00a0read\u00a0file\u00a0counts\u00a0in\u00a0folder\");\r\n\u00a0\u00a0Serial.println(\"\u00a0\u00a0\u00a0\u00a0\u00a0x\u00a0=\u00a07\u00a0-\u00a0read\u00a0folder\u00a0counts\");\r\n}\r\n\r\nvoid\u00a0printDetail(uint8_t\u00a0type,\u00a0int\u00a0value){\r\n\u00a0\u00a0switch\u00a0(type)\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0TimeOut:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"Time\u00a0Out!\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0WrongStack:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"Stack\u00a0Wrong!\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0DFPlayerCardInserted:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"Card\u00a0Inserted!\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0DFPlayerCardRemoved:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"Card\u00a0Removed!\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0DFPlayerCardOnline:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"Card\u00a0Online!\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0DFPlayerUSBInserted:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(\"USB\u00a0Inserted!\");\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0DFPlayerUSBRemoved:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(\"USB\u00a0Removed!\");\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0DFPlayerPlayFinished:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.print(F(\"Number:\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.print(value);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"\u00a0Play\u00a0Finished!\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0case\u00a0DFPlayerError:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.print(F(\"DFPlayerError:\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0switch\u00a0(value)\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0case\u00a0Busy:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"Card\u00a0not\u00a0found\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0case\u00a0Sleeping:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"Sleeping\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0case\u00a0SerialWrongStack:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"Get\u00a0Wrong\u00a0Stack\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0case\u00a0CheckSumNotMatch:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"Check\u00a0Sum\u00a0Not\u00a0Match\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0case\u00a0FileIndexOut:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"File\u00a0Index\u00a0Out\u00a0of\u00a0Bound\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0case\u00a0FileMismatch:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"Cannot\u00a0Find\u00a0File\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0case\u00a0Advertise:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Serial.println(F(\"In\u00a0Advertise\"));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0default:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0\u00a0\u00a0default:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;\r\n\u00a0\u00a0}\u00a0\u00a0\r\n}<\/pre>\r\n<\/div>\n\n<p>The only thing that doesn&#8217;t work <em>yet<\/em>, at least, are the queries (&#8220;q&#8221; commands in the menu). I think I&#8217;ve got to go deeper at a later stage. If you find that out, I&#8217;d be grateful for a hint. <\/p>\r\n\n<p><a href=\"https:\/\/wolles-elektronikkiste.de\/en\/mp3-player-yx5300\" target=\"_blank\" rel=\"noopener noreferrer\">In my last post<\/a> I showed how to control the YX5300 MP3 module with your smartphone. This could be transferred to the DFPlayer Mini with relatively little effort. &nbsp;<\/p>\r\n\n<h3 class=\"wp-block-heading\">Does it work without a library? <\/h3>\n\n<p>Controlling the DFPlayer Mini with the Arduino without a library is no witchcraft, as the data sheet is quite easy to understand. This is the structure of the commands:<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Kommandostruktur-1024x455.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"455\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Kommandostruktur-1024x455.webp\" alt=\"\" class=\"wp-image-19617\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Kommandostruktur-1024x455.webp 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Kommandostruktur-300x133.webp 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Kommandostruktur-768x341.webp 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/Kommandostruktur.webp 1287w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<p>Each command sequence begins with &#8220;7E&#8221;. This is followed by VER (version), which is basically &#8220;FF&#8221;. &#8220;Len&#8221; is the command length in bytes. This does not count start bytes, end bytes, and checksum. Normally, this means six bytes remain. &#8220;CMD&#8221; is the actual command and there is a list in the data sheet for this. &#8220;Feedback&#8221; controls whether you get a response from the module. There is only &#8220;01&#8221; for feedback and &#8220;00&#8221; for no feedback. &#8220;para1&#8221; and &#8220;para2&#8221; are &#8211; not surprisingly &#8211; the command parameters. These are also listed in the data sheet. The check sum gives additional security, but you can also omit it. The data sheet explains how to calculate the checksum. <\/p>\r\n<p>Here&#8217;s an example. To play a specific song in a standard folder, the command 0x0F is used. If you want to play song 002 in folder 01 and no feedback is required, the command sequence without checksum is:<\/p>\r\n<p><code>7E FF 06 0F 00 01 02 EF<\/code><\/p>\r\n<p>The bytes are transmitted individually via Serial.write(<em>xth byte<\/em>). &#8220;Serial&#8221; must be replaced by the defined SoftwareSerial. It&#8217;s quite hard to implement the commands, so you can be glad that there are libraries. But personally, I always aim to understand what is happening behind the scenes. <\/p>\r\n\n<h2 class=\"wp-block-heading\">Control via pushbuttons<\/h2>\n\n<p>There is another option to control the DFPlayer Mini. As mentioned above, many functions can also be used via the <span style=\"display: inline !important; float: none; background-color: #ffffff; color: #191e23; cursor: text; font-family: 'Noto Serif'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;\">Adkeyx and IOx connector pins <\/span>9, 11, 12 and 13.&nbsp;<\/p>\r\n<p>The IOx connectors are connected to GND via pushbuttons. Depending on whether you press short or long, the next song is played or the volume is increased or the previous file is played or the volume decreases.&nbsp;<\/p>\r\n<p>With the ADKEYx connectors, various functions can be controlled by adding additional resistors. I&#8217;ve tried it and it works perfectly.<\/p>\r\n<p>By the way, &#8220;Segment X&#8221; means &#8220;play song No. X&#8221;. However, the order of copying the songs is again important, regardless of the type of folder (!).&nbsp;<\/p>\r\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini_SpeakerAnschluss.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"742\" height=\"385\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini_SpeakerAnschluss.jpg\" alt=\"Circuit diagram for connection of pushbuttons to ADKEY and IO without resistors\" class=\"wp-image-1245\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini_SpeakerAnschluss.jpg 742w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini_SpeakerAnschluss-300x156.jpg 300w\" sizes=\"auto, (max-width: 742px) 100vw, 742px\" \/><\/a><figcaption class=\"wp-element-caption\"><br\/>Connection of pushbuttons to ADKEY and IO without resistors<\/figcaption><\/figure>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini_Adkey-1024x715.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"715\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini_Adkey-1024x715.webp\" alt=\"\" class=\"wp-image-19619\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini_Adkey-1024x715.webp 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini_Adkey-300x210.webp 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini_Adkey-768x537.webp 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/DFPlayer_Mini_Adkey.webp 1092w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Connection of pushbuttons to ADKEY with resistors<\/figcaption><\/figure>\n\n<h2 class=\"wp-block-heading\">DFPlayer Mini vs. YX5300<\/h2>\n\n<p>Now that I have tested both modules, I have to say that both are quite similar in terms of functionality. However, the DFPlayer Mini is much more flexible with its key functions compared to the YX5300 module. It&#8217;s an advantage of the DFPlayer Mini that it has pins for the speaker or amplifier connection. Added to this is the small size of the module. The advantage of the YX5300 module, on the other hand, is the jack plug socket, to which headphones or (active) speakers can be connected directly. If you don&#8217;t like to tinker, the YX5300 may be better the better choice. <\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>How to control the DFPlayer Mini with Arduino or buttons; specifications and properties; folder and file structure; DFRobotDFPlayerMini library<\/p>\n","protected":false},"author":1,"featured_media":7933,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[576],"tags":[644,648,649,652,650,654,646,642],"class_list":["post-9040","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sound-en","tag-control-the-dfplayer-mini","tag-dfplayer-mini-arduino-en-2","tag-dfplayer-mini-circuit","tag-dfplayer-mini-library","tag-dfplayer-mini-technical-data","tag-dfrobotdfplayermini-library-2","tag-mp3-en-2","tag-programming-dfplayer-mini"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Arduino controlled DFPlayer Mini &#8226; Wolles Elektronikkiste<\/title>\n<meta name=\"description\" content=\"Control the DFPlayer Mini with Arduino or buttons; technical data and properties; folder and file structure; DFRobotDFPlayerMini library\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Arduino controlled DFPlayer Mini &#8226; Wolles Elektronikkiste\" \/>\n<meta property=\"og:description\" content=\"Control the DFPlayer Mini with Arduino or buttons; technical data and properties; folder and file structure; DFRobotDFPlayerMini library\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini\" \/>\n<meta property=\"og:site_name\" content=\"Wolles Elektronikkiste\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-18T12:35:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-04T20:23:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/digital-1295560_960_720.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"720\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Wolfgang Ewald\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Wolfgang Ewald\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini\"},\"author\":{\"name\":\"Wolfgang Ewald\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"headline\":\"Arduino controlled DFPlayer Mini\",\"datePublished\":\"2020-10-18T12:35:05+00:00\",\"dateModified\":\"2023-12-04T20:23:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini\"},\"wordCount\":1384,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/digital-1295560_960_720.jpg\",\"keywords\":[\"Control the DFPlayer Mini\",\"DFPlayer Mini Arduino\",\"DFPlayer Mini circuit\",\"DFPlayer Mini library\",\"DFPlayer Mini technical data\",\"DFRobotDFPlayerMini library\",\"MP3\",\"Programming DFPlayer Mini\"],\"articleSection\":[\"Sound\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini\",\"name\":\"Arduino controlled DFPlayer Mini &#8226; Wolles Elektronikkiste\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/digital-1295560_960_720.jpg\",\"datePublished\":\"2020-10-18T12:35:05+00:00\",\"dateModified\":\"2023-12-04T20:23:09+00:00\",\"description\":\"Control the DFPlayer Mini with Arduino or buttons; technical data and properties; folder and file structure; DFRobotDFPlayerMini library\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini#primaryimage\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/digital-1295560_960_720.jpg\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/digital-1295560_960_720.jpg\",\"width\":720,\"height\":720,\"caption\":\"Beitragsbild zu DFPlayer Ansteuerung mit dem Arduino\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/arduino-controlled-dfplayer-mini#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Arduino controlled DFPlayer Mini\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\",\"name\":\"Wolles Elektronikkiste\",\"description\":\"Die wunderbare Welt der Elektronik\",\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\",\"name\":\"Wolfgang Ewald\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"width\":512,\"height\":512,\"caption\":\"Wolfgang Ewald\"},\"logo\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Arduino controlled DFPlayer Mini &#8226; Wolles Elektronikkiste","description":"Control the DFPlayer Mini with Arduino or buttons; technical data and properties; folder and file structure; DFRobotDFPlayerMini library","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini","og_locale":"en_US","og_type":"article","og_title":"Arduino controlled DFPlayer Mini &#8226; Wolles Elektronikkiste","og_description":"Control the DFPlayer Mini with Arduino or buttons; technical data and properties; folder and file structure; DFRobotDFPlayerMini library","og_url":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini","og_site_name":"Wolles Elektronikkiste","article_published_time":"2020-10-18T12:35:05+00:00","article_modified_time":"2023-12-04T20:23:09+00:00","og_image":[{"width":720,"height":720,"url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/digital-1295560_960_720.jpg","type":"image\/jpeg"}],"author":"Wolfgang Ewald","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Wolfgang Ewald","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini#article","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini"},"author":{"name":"Wolfgang Ewald","@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"headline":"Arduino controlled DFPlayer Mini","datePublished":"2020-10-18T12:35:05+00:00","dateModified":"2023-12-04T20:23:09+00:00","mainEntityOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini"},"wordCount":1384,"commentCount":3,"publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/digital-1295560_960_720.jpg","keywords":["Control the DFPlayer Mini","DFPlayer Mini Arduino","DFPlayer Mini circuit","DFPlayer Mini library","DFPlayer Mini technical data","DFRobotDFPlayerMini library","MP3","Programming DFPlayer Mini"],"articleSection":["Sound"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini","url":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini","name":"Arduino controlled DFPlayer Mini &#8226; Wolles Elektronikkiste","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#website"},"primaryImageOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini#primaryimage"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/digital-1295560_960_720.jpg","datePublished":"2020-10-18T12:35:05+00:00","dateModified":"2023-12-04T20:23:09+00:00","description":"Control the DFPlayer Mini with Arduino or buttons; technical data and properties; folder and file structure; DFRobotDFPlayerMini library","breadcrumb":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini#primaryimage","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/digital-1295560_960_720.jpg","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/04\/digital-1295560_960_720.jpg","width":720,"height":720,"caption":"Beitragsbild zu DFPlayer Ansteuerung mit dem Arduino"},{"@type":"BreadcrumbList","@id":"https:\/\/wolles-elektronikkiste.de\/en\/arduino-controlled-dfplayer-mini#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/wolles-elektronikkiste.de\/en"},{"@type":"ListItem","position":2,"name":"Arduino controlled DFPlayer Mini"}]},{"@type":"WebSite","@id":"https:\/\/wolles-elektronikkiste.de\/en#website","url":"https:\/\/wolles-elektronikkiste.de\/en","name":"Wolles Elektronikkiste","description":"Die wunderbare Welt der Elektronik","publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wolles-elektronikkiste.de\/en?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46","name":"Wolfgang Ewald","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","width":512,"height":512,"caption":"Wolfgang Ewald"},"logo":{"@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png"}}]}},"_links":{"self":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/9040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/comments?post=9040"}],"version-history":[{"count":0,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/9040\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media\/7933"}],"wp:attachment":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media?parent=9040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/categories?post=9040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/tags?post=9040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}