{"id":2745,"date":"2021-07-07T07:21:10","date_gmt":"2021-07-07T14:21:10","guid":{"rendered":"https:\/\/www.donluc.com\/?p=2745"},"modified":"2021-07-07T07:21:10","modified_gmt":"2021-07-07T14:21:10","slug":"project-16-sound-sparkfun-thing-plus-esp32-wroom-mk19","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=2745","title":{"rendered":"Project #16: Sound &#8211; SparkFun Thing Plus ESP32 WROOM &#8211; Mk19"},"content":{"rendered":"<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-2745-1\" width=\"720\" height=\"480\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #Sound #Arduino #ESP32 #SparkFunThingPlusESP32WROOM #SparkFunQwiicMP3 #Project #Programming #Electronics #Microcontrollers #Consultant #VideoBlog<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01a.png\" alt=\"SparkFun Thing Plus ESP32 WROOM\" width=\"720\" height=\"458\" class=\"alignnone size-full wp-image-2747\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01a.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01a-300x191.png 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\/2021\/07\/DL2107Mk01b.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01b.png\" alt=\"SparkFun Thing Plus ESP32 WROOM\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2748\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01b.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01b-300x200.png 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\/2021\/07\/DL2107Mk01c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01c.png\" alt=\"SparkFun Thing Plus ESP32 WROOM\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2749\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01c.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01c-300x200.png 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\/2021\/07\/DL2107Mk01d.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01d.png\" alt=\"SparkFun Thing Plus ESP32 WROOM\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2750\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01d.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/07\/DL2107Mk01d-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;-<\/p>\n<p><strong>SparkFun Thing Plus &#8211; ESP32 WROOM<\/strong><\/p>\n<p>The SparkFun ESP32 Thing Plus is the next step to get started with Espressif IoT ideations while still enjoying all the amenities of the original ESP32 Thing. Espressif&#8217;s ESP32 WROOM is a powerful WiFi and Bluetooth MCU module that targets a wide variety of applications. At the core of this module is the ESP32-D0WDQ6 chip which is designed to be both scalable and adaptive. To make the Thing Plus even easier to use, we&#8217;ve moved a few pins around to make the board Feather compatible and it utilizes our handy Qwiic Connect System which means no soldering or shields are required to connect it to the rest of your system. A JST connector to plug in a LiPo battery.<\/p>\n<p><strong>SparkFun Qwiic MP3 Trigger<\/strong><\/p>\n<p>Sometimes you just need an MP3 to play. The SparkFun Qwiic MP3 Trigger takes care of all the necessary requirements, all you need to do is send a simple I2C command and listen to whatever is on your micro SD card. The contents of the microSD card appears as a jump drive. Simply plug in the Qwiic MP3 Trigger and you&#8217;ll be transferring MP3s, no need for drivers and no need for WAV or Vorbis conversion. Your supplied speaker is boosted by a Class-D mono amplifier capable of outputting up to 1.4W making it capable of being incredibly loud. Volume is software selectable between 32 levels.<\/p>\n<p><strong>DL2107Mk01<\/strong><\/p>\n<p>1 x SparkFun Thing Plus &#8211; ESP32 WROOM<br \/>\n1 x SparkFun Qwiic MP3 Trigger<br \/>\n1 x microSD Card &#8211; 2GB<br \/>\n1 x Panel Mount 1K potentiometer<br \/>\n1 x Knob<br \/>\n1 x Qwiic Cable &#8211; 100mm<br \/>\n1 x Dayton Audio Reference 3&#8243; Full-Range Drive<br \/>\n2 x Wire Stranded Core &#8211; 18 AWG<br \/>\n7 x Wire Solid Core &#8211; 22 AWG<br \/>\n1 x Full-Size Breadboard<br \/>\n1 x SparkFun Cerberus USB Cable<\/p>\n<p><strong>SparkFun Thing Plus &#8211; ESP32 WROOM<\/strong><\/p>\n<p>PO1 &#8211; Analog A0<br \/>\nSW0 &#8211; Digital 21<br \/>\nSW1 &#8211; Digital 17<br \/>\nVIN &#8211; +3.3V<br \/>\nGND &#8211; GND<\/p>\n<p><strong>DL2107Mk01p.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ ***** Don Luc Electronics \u00a9 *****\r\n\/\/ Software Version Information\r\n\/\/ #16 - Sound - SparkFun Thing Plus ESP32 WROOM - Mk19\r\n\/\/ 07-01\r\n\/\/ DL2107Mk01p.ino\r\n\/\/ 1 x SparkFun RedBoard Qwiic\r\n\/\/ 1 x SparkFun Qwiic MP3 Trigger\r\n\/\/ 1 x microSD Card - 2GB\r\n\/\/ 1 x Panel Mount 1K potentiometer\r\n\/\/ 1 x Knob\r\n\/\/ 1 x Qwiic Cable - 100mm\r\n\/\/ 1 x Dayton Audio Reference 3&quot; Full-Range Drive\r\n\/\/ 2 x Wire Stranded Core - 18 AWG\r\n\/\/ 7 x Wire Solid Core - 22 AWG\r\n\/\/ 1 x Full-Size Breadboard\r\n\/\/ 1 x SparkFun Cerberus USB Cable\r\n\r\n\/\/ Include the Library Code\r\n\/\/ Wire communicate with I2C \/ TWI devices\r\n#include &lt;Wire.h&gt;\r\n\/\/ SparkFun MP3 Trigger\r\n#include &quot;SparkFun_Qwiic_MP3_Trigger_Arduino_Library.h&quot;\r\n\r\n\/\/ SparkFun MP3 Trigger\r\nMP3TRIGGER mp3;\r\n\r\nint iSongCount = 0;\r\nint x = 0;\r\n\r\n\/\/ Volume\r\nint iVolume = A0;\r\nint iVolumeLevel = 0;\r\n\r\n\/\/ EQ Setting Normal\r\nbyte bEQSetting = 0;\r\n\r\n\/\/ Play Next\r\nconst int iPlayNext = 21;\r\n\/\/ Variable for reading the iPlayNext status\r\nint iPlayNextState = 0;\r\n\r\n\/\/ Play Previous\r\nconst int iPlayPrevious = 17;\r\n\/\/ Variable for reading the iPlayPrevious status\r\nint iPlayPreviousState = 0;\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;16-19&quot;;\r\n\r\nvoid loop()\r\n{\r\n    \r\n   if (mp3.isPlaying() == false) {\r\n\r\n    if ( x &gt; iSongCount ) {\r\n\r\n      x = 0;\r\n      \r\n    } else {\r\n\r\n      x = x + 1;\r\n      \r\n    }\r\n    \r\n    \/\/ Play Track\r\n    mp3.playTrack( x );\r\n    \r\n  } else {\r\n\r\n    \/\/ Volume\r\n    isVolume();\r\n\r\n    \/\/ Play Next\r\n    isPlayNext();\r\n\r\n    \/\/ Play Previous\r\n    isPlayPrevious();\r\n\r\n  }\r\n\r\n}\r\n<\/pre>\n<p><strong>getMP3.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ MP3\r\n\/\/ Setup MP3\r\nvoid isSetupMP3(){\r\n\r\n  \/\/ Check to see if Qwiic MP3 is present on the bus\r\n  if (mp3.begin() == false)\r\n  {\r\n    \r\n    \/\/ Qwiic MP3 failed to respond. Please check wiring and possibly the I2C address. Freezing...\r\n    while (1);\r\n    \r\n  }\r\n\r\n  if (mp3.hasCard() == false)\r\n  {\r\n    \r\n    \/\/ Qwiic MP3 is missing its SD card. Freezing...\r\n    while (1);\r\n    \r\n  }\r\n\r\n  \/\/ Song Count\r\n  iSongCount = mp3.getSongCount();\r\n\r\n  \/\/ EQ Setting Classic\r\n  bEQSetting = mp3.getEQ();\r\n\r\n  \/\/ Initialize the iPlayNext\r\n  pinMode( iPlayNext, INPUT);\r\n\r\n  \/\/ Initialize the iPlayPrevious\r\n  pinMode( iPlayPrevious, INPUT);\r\n\r\n}\r\n\/\/ Volume\r\nvoid isVolume() {\r\n\r\n  \/\/ Volume\r\n  iVolumeLevel = analogRead( iVolume );\r\n  \/\/ (0-1023 for 10 bits or 0-4095 for 12 bits)\r\n  iVolumeLevel = map(iVolumeLevel, 0, 4095, 0, 31);\r\n\r\n  \/\/ Volume can be 0 (off) to 31 (max)\r\n  mp3.setVolume( iVolumeLevel );\r\n  \r\n}\r\n\/\/ Play Next\r\nvoid isPlayNext() {\r\n\r\n  \/\/ Read the state of the iPlayNext value\r\n  iPlayNextState = digitalRead( iPlayNext );\r\n\r\n  if ( iPlayNextState == HIGH ) {\r\n\r\n    mp3.stop();\r\n    \r\n    if ( x &gt; iSongCount ) {\r\n\r\n      x = 0;\r\n      \r\n    } else {\r\n\r\n      x = x + 1;\r\n      \r\n    }\r\n    \r\n    \/\/ Play Track\r\n    mp3.playTrack( x );     \r\n    \r\n  } \r\n\r\n}\r\n\/\/ Play Previous\r\nvoid isPlayPrevious() {\r\n\r\n  \/\/ Read the state of the iPlayPrevious value\r\n  iPlayPreviousState = digitalRead( iPlayPrevious );\r\n\r\n  if ( iPlayPreviousState == HIGH ) {\r\n\r\n    mp3.stop();\r\n    \r\n    if ( x &gt; iSongCount ) {\r\n\r\n      x = 0;\r\n      \r\n    } else {\r\n\r\n      x = x - 1;\r\n      \r\n    }\r\n    \r\n    \/\/ Play Track\r\n    mp3.playTrack( x );     \r\n    \r\n  } \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   \/\/ Wire communicate with I2C \/ TWI devices\r\n   Wire.begin();\r\n\r\n   \/\/ SparkFun MP3 Trigger Setup\r\n   isSetupMP3();\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>Technology Experience<\/strong><\/p>\n<ul>\n<li>Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc&#8230;)<\/li>\n<li>Robotics<\/li>\n<li>Research &#038; Development (R &#038; D)<\/li>\n<li>Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc&#8230;)<\/li>\n<li>Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc&#8230;)<\/li>\n<li>Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc&#8230;)<\/li>\n<li>Social Media Programming &#038; Integration (Facebook, Twitter, YouTube, Pinterest, etc&#8230;)<\/li>\n<li>Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc&#8230;)<\/li>\n<li>Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc&#8230;)<\/li>\n<li>eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc&#8230;)<\/li>\n<\/ul>\n<p><strong>Instructor<\/strong><\/p>\n<ul>\n<li>PIC Microcontrollers<\/li>\n<li>Arduino<\/li>\n<li>Raspberry Pi<\/li>\n<li>Espressif<\/li>\n<li>Robotics<\/li>\n<li>DOS, Windows, OSX, Linux, iOS, Android, Multi-OS<\/li>\n<li>Linux-Apache-PHP-MySQL<\/li>\n<\/ul>\n<p><strong>Follow Us<\/strong><\/p>\n<p><strong>J. Luc Paquin \u2013 Curriculum Vitae &#8211; 2021 English &#038; Espa\u00f1ol<\/strong><br \/>\nhttps:\/\/www.jlpconsultants.com\/CV\/LucPaquinCVEngMk2021c.pdf<br \/>\nhttps:\/\/www.jlpconsultants.com\/CV\/LucPaquinCVEspMk2021c.pdf<\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.com\/<br \/>\n<strong>Web:<\/strong> http:\/\/www.jlpconsultants.com\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.donluc.com\/DLE\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.donluc.com\/DLHackster\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.hackster.io\/neosteam-labs<br \/>\n<strong>Web:<\/strong> https:\/\/zoom.us\/<br \/>\n<strong>Patreon:<\/strong> https:\/\/www.patreon.com\/DonLucElectronics<br \/>\n<strong>Facebook:<\/strong> https:\/\/www.facebook.com\/neosteam.labs.9\/<br \/>\n<strong>YouTube:<\/strong> https:\/\/www.youtube.com\/channel\/UC5eRjrGn1CqkkGfZy0jxEdA<br \/>\n<strong>Twitter:<\/strong> https:\/\/twitter.com\/labs_steam<br \/>\n<strong>Pinterest:<\/strong> https:\/\/www.pinterest.com\/NeoSteamLabs\/<br \/>\n<strong>Instagram:<\/strong> https:\/\/www.instagram.com\/neosteamlabs\/<\/p>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212; #DonLucElectronics #DonLuc #Sound #Arduino #ESP32 #SparkFunThingPlusESP32WROOM #SparkFunQwiicMP3 #Project #Programming #Electronics #Microcontrollers #Consultant #VideoBlog &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212;- SparkFun Thing Plus &#8211; ESP32 WROOM The SparkFun ESP32 Thing Plus is the next step to get started with Espressif IoT ideations while still enjoying all the amenities of the original ESP32 Thing. Espressif&#8217;s ESP32 WROOM &#8230; <a title=\"Project #16: Sound &#8211; SparkFun Thing Plus ESP32 WROOM &#8211; Mk19\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=2745\" aria-label=\"Read more about Project #16: Sound &#8211; SparkFun Thing Plus ESP32 WROOM &#8211; Mk19\">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,38,80,59,5,138,82,10,43],"tags":[6,102,4,19,83,85,24,9,84,27,120,109,142,163,33,34],"class_list":["post-2745","post","type-post","status-publish","format-standard","hentry","category-sound","category-digitalelectronics","category-esp32","category-fritzing","category-microcontrollers","category-patreon","category-program-esp32","category-projects","category-sparkfun","tag-arduino","tag-components","tag-consultant","tag-electronics","tag-esp32","tag-fritzing","tag-microcontroller","tag-programming","tag-programming-esp32","tag-projects-2","tag-sound","tag-sparkfun","tag-sparkfun-qwiic-mp3-trigger","tag-sparkfun-thing-plus-esp32-wroom","tag-technology","tag-video-blog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2745","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=2745"}],"version-history":[{"count":2,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2745\/revisions"}],"predecessor-version":[{"id":3974,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2745\/revisions\/3974"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}