{"id":4945,"date":"2026-08-19T08:47:31","date_gmt":"2026-08-19T15:47:31","guid":{"rendered":"https:\/\/www.donluc.com\/?p=4945"},"modified":"2026-08-19T08:47:31","modified_gmt":"2026-08-19T15:47:31","slug":"project-16-sound-dfplayer-pro-mk30","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=4945","title":{"rendered":"Project #16: Sound \u2013 DFPlayer Pro \u2013 Mk30"},"content":{"rendered":"<div style=\"width: 1200px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4945-1\" width=\"1200\" height=\"675\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #DFPlayerPro #ArduinoUNO #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01a.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01a.jpg\" alt=\"DFPlayer Pro\" width=\"720\" height=\"912\" class=\"alignnone size-full wp-image-4947\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01a.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01a-237x300.jpg 237w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01b.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01b.jpg\" alt=\"DFPlayer Pro\" width=\"720\" height=\"404\" class=\"alignnone size-full wp-image-4948\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01b.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01b-300x168.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01c.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01c.jpg\" alt=\"DFPlayer Pro\" width=\"720\" height=\"404\" class=\"alignnone size-full wp-image-4949\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01c.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/08\/DL2608Mk01c-300x168.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>DFPlayer Pro MP3 Player Module<\/strong><\/p>\n<p>The DFPlayer Pro MP3 player module offers high-quality dual channel audio with 128MB storage, 24-bit DAC output, and a UART interface. It supports multiple control modes, including Arduino, AT command, on-board buttons, and ADKEY. With USB connectivity, It allows easy music copying and supports various audio formats, including MP3, WAV, WMA, FLAC (Free Lossless Audio Codec), and APE (Monkey&#8217;s Audio) for high-fidelity lossless audio experiences. Compatible with Arduino and Raspberry Pi, the DFPlayer Pro is ideal for self-service devices, ATM voice prompt systems, medical diagnostic equipment, in-car high-fidelity voice navigation, public address systems, and voice alarm systems. <\/p>\n<p><strong>DL2608Mk01<\/strong><\/p>\n<p>1 x Arduino UNO R3<br \/>\n1 x Fermion: DFPlayer Pro MP3 Player Module<br \/>\n2 x Stereo Enclosed Speaker &#8211; 3W 8Ohm<br \/>\n1 x Gravity: Analog ADKeyboard Module V2<br \/>\n1 x ProtoScrew Shield<br \/>\n1 x USB Battery Pack<br \/>\n1 x USB Mini-B Cable<\/p>\n<p><strong>DL2608Mk01p<\/strong><\/p>\n<p><strong>DL2608Mk01p.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/****** Don Luc Electronics \u00a9 ******\r\nSoftware Version Information\r\nProject #16: Sound \u2013 DFPlayer Pro \u2013 Mk29\r\n16-30\r\nDL2608Mk01p.ino\r\nDL2608Mk01p\r\n1 x Arduino UNO R3\r\n1 x Fermion: DFPlayer Pro MP3 Player Module\r\n2 x Stereo Enclosed Speaker - 3W 8Ohm\r\n1 x Gravity: Analog ADKeyboard Module V2\r\n1 x ProtoScrew Shield\r\n1 x USB Battery Pack\r\n1 x USB Mini-B Cable\r\n*\/\r\n\r\n\/\/ Include the Library Code\r\n\/\/ DFRobot DF1201S\r\n#include &lt;DFRobot_DF1201S.h&gt;\r\n\/\/ Software Serial\r\n#include &quot;SoftwareSerial.h&quot;\r\n\r\n\/\/ RX  TX\r\nSoftwareSerial DF1201SSerial(2, 3);\r\n\r\n\/\/ DFRobot DF1201S\r\nDFRobot_DF1201S DF1201S;\r\n\r\n\/\/ AD Switch\r\n\/\/int iADSwitch = A3;\r\n\/\/ Val\r\nint adc_key_val[5] ={600,650, 700,  800, 900 };\r\n\/\/ Nun Keys\r\nint NUM_KEYS = 5;\r\n\/\/ In\r\nint adc_key_in;\r\n\/\/ Kay\r\nint key = -1;\r\n\/\/ Old Key\r\nint oldkey=-1; \r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;16-30&quot;;\r\n\r\nvoid loop() {\r\n  \r\n  \/\/  AD Switch\r\n   isADSwitch();\r\n  \r\n}\r\n<\/pre>\n<p><strong>getADSwitch.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/  AD Switch\r\nvoid isADSwitch(){\r\n\r\n  \/\/ Read the value from the sensor\r\n  adc_key_in = analogRead(0);\r\n\r\n  \/\/ Convert into position\r\n  key = get_key(adc_key_in);\r\n\r\n  \/\/ If keypress is detected\r\n  if (key != oldkey) \r\n   {\r\n    \r\n    \/\/ Wait for debounce time\r\n    delay(50);\r\n\r\n    \/\/ Read the value from the sensor\r\n    adc_key_in = analogRead(0); \r\n\r\n    \/\/ Convert into key press\r\n    key = get_key(adc_key_in);\r\n\r\n    if (key != oldkey)\r\n    {\r\n      \r\n      oldkey = key;\r\n      if (key &gt;=0){\r\n        \r\n        switch(key)\r\n        {\r\n           case 0:\r\n  \r\n             \/*Pause*\/\r\n             Serial.println(&quot;Pause&quot;);\r\n             DF1201S.pause();\r\n            \r\n                  break;\r\n           case 1:\r\n             \r\n             \/\/ isPlayer\r\n             Serial.println(&quot;Play&quot;);\r\n             isPlayer();\r\n           \r\n                  break;\r\n           case 2:\r\n             \r\n             \/*Play the next song*\/\r\n             Serial.println(&quot;Next&quot;);\r\n             DF1201S.next();\r\n           \r\n                  break;\r\n           case 3:\r\n             \r\n             \/*Play the previous song*\/\r\n             Serial.println(&quot;Previous&quot;);\r\n             DF1201S.last();\r\n           \r\n            break;\r\n           case 4:\r\n           \r\n           \/\/Total File\r\n           Serial.print(&quot;File number: &quot;);\r\n           \/\/ Get file number\r\n           Serial.println(DF1201S.getCurFileNumber());\r\n\r\n           break;\r\n        }\r\n      }\r\n    }\r\n  }\r\n  delay(100);\r\n\r\n}\r\n\/\/ Convert ADC value to key number\r\nint get_key(unsigned int input)\r\n{\r\n    int k;\r\n    for (k = 0; k &lt; NUM_KEYS; k++)\r\n    {\r\n      if (input &lt; adc_key_val[k])\r\n     {\r\n            return k;\r\n        }\r\n   }\r\n       if (k &gt;= NUM_KEYS)k = -1;  \/\/ No valid key pressed\r\n       return k;\r\n}\r\n<\/pre>\n<p><strong>getMP3Player.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ DFPlayer Pro MP3 Player Module\r\n\/\/ isPlayer\r\nvoid isPlayer(){\r\n  \r\n  \/*Start playing*\/\r\n  DF1201S.start();\r\n\r\n}\r\n<\/pre>\n<p><strong>setup.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Setup\r\nvoid setup()\r\n{\r\n \r\n  \/\/ Serial\r\n  Serial.begin(115200);\r\n  \r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n  \/\/ DFRobot DF1201S\r\n  DF1201SSerial.begin(115200);\r\n\r\n  while (!DF1201S.begin(DF1201SSerial)) {\r\n    \r\n    Serial.println(&quot;Init failed, please check the wire connection!&quot;);\r\n    delay(1000);\r\n    \r\n  }\r\n\r\n  \/*Set volume to 20*\/\r\n  DF1201S.setVol(20);\r\n\r\n  \/*Enter music mode*\/\r\n  DF1201S.switchFunction(DF1201S.MUSIC);\r\n\r\n  \/*Wait for the end of the prompt tone *\/\r\n  delay(2000);\r\n\r\n  \/*Set playback mode to &quot;repeat all&quot;*\/\r\n  DF1201S.setPlayMode(DF1201S.ALLCYCLE);\r\n\r\n  \/*Get playback mode*\/\r\n  Serial.println(DF1201S.getPlayMode());\r\n\r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n}\r\n<\/pre>\n<p>&#8212;&#8212;<\/p>\n<p><strong>People can contact us:<\/strong> https:\/\/www.donluc.com\/?page_id=1927<\/p>\n<p><strong>Consultant, R&#038;D, Electronics, IoT, Teacher and Instructor<\/strong><\/p>\n<ul>\n<li>Programming Language<\/li>\n<li>Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc&#8230;)<\/li>\n<li>IoT<\/li>\n<li>Wireless (Radio Frequency, Bluetooth, WiFi, Etc&#8230;)<\/li>\n<li>Robotics<\/li>\n<li>Automation<\/li>\n<li>Camera and Video Capture Receiver Stationary, Wheel\/Tank , Underwater and UAV Vehicle<\/li>\n<li>Unmanned Vehicles Terrestrial,  Marine and UAV<\/li>\n<li>Machine Learning<\/li>\n<li>Artificial Intelligence (AI)<\/li>\n<li>RTOS<\/li>\n<li>Sensors, eHealth Sensors, Biosensor, and Biometric<\/li>\n<li>Research &#038; Development (R &#038; D)<\/li>\n<li>Consulting<\/li>\n<\/ul>\n<p><strong>Follow Us<\/strong><\/p>\n<p><strong>Luc Paquin \u2013 Curriculum Vitae &#8211; 2026<\/strong><br \/>\nhttps:\/\/www.donluc.com\/luc\/LucPaquinCVEng2026Mk01.pdf<br \/>\nhttps:\/\/www.donluc.com\/luc\/<\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.com\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.jlpconsultants.com\/<br \/>\n<strong>Facebook:<\/strong> https:\/\/www.facebook.com\/neosteam.labs.9\/<br \/>\n<strong>YouTube:<\/strong> https:\/\/www.youtube.com\/@thesass2063<br \/>\n<strong>DFRobot:<\/strong> https:\/\/learn.dfrobot.com\/user-10186.html<br \/>\n<strong>TikTok:<\/strong> https:\/\/www.tiktok.com\/@luc.paquin8<br \/>\n<strong>Hackster:<\/strong> https:\/\/www.hackster.io\/luc-paquin<br \/>\n<strong>LinkedIn:<\/strong> https:\/\/www.linkedin.com\/in\/jlucpaquin\/<\/p>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212; #DonLucElectronics #DonLuc #DFPlayerPro #ArduinoUNO #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; DFPlayer Pro MP3 Player Module The DFPlayer Pro MP3 player module offers high-quality dual channel audio with 128MB storage, 24-bit DAC output, and a UART interface. It supports multiple control modes, including Arduino, AT command, on-board buttons, and ADKEY. &#8230; <a title=\"Project #16: Sound \u2013 DFPlayer Pro \u2013 Mk30\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=4945\" aria-label=\"Read more about Project #16: Sound \u2013 DFPlayer Pro \u2013 Mk30\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[119,397,50,49,317,38,59,115,5,287,58,10],"tags":[6,92,102,4,433,320,19,85,24,9,27,120,33,34,108],"class_list":["post-4945","post","type-post","status-publish","format-standard","hentry","category-sound","category-arduino-digitalelectronics","category-arduino","category-consultant","category-dfrobot","category-digitalelectronics","category-fritzing","category-e-mentor","category-microcontrollers","category-program","category-arduino-programming","category-projects","tag-arduino","tag-battery","tag-components","tag-consultant","tag-dfplayer-pro","tag-dfrobot","tag-electronics","tag-fritzing","tag-microcontroller","tag-programming","tag-projects-2","tag-sound","tag-technology","tag-video-blog","tag-vlog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4945"}],"version-history":[{"count":1,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4945\/revisions"}],"predecessor-version":[{"id":4950,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4945\/revisions\/4950"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}