{"id":2645,"date":"2021-02-24T07:49:23","date_gmt":"2021-02-24T15:49:23","guid":{"rendered":"http:\/\/www.donluc.com\/?p=2645"},"modified":"2021-02-24T07:49:23","modified_gmt":"2021-02-24T15:49:23","slug":"17-meditation-glasses-led-meditation-sparkfun-qwiic-mp3-trigger-mk03","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=2645","title":{"rendered":"#17 &#8211; Meditation &#8211; Glasses LED Meditation &#8211; SparkFun Qwiic MP3 Trigger &#8211; Mk03"},"content":{"rendered":"<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-2645-1\" width=\"720\" height=\"480\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06a.png\" alt=\"SparkFun Qwiic MP3 Trigger\" width=\"720\" height=\"562\" class=\"alignnone size-full wp-image-2647\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06a.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06a-300x234.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\/02\/DL2102Mk06b.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06b.png\" alt=\"SparkFun Qwiic MP3 Trigger\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2648\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06b.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06b-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\/02\/DL2102Mk06c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06c.png\" alt=\"SparkFun Qwiic MP3 Trigger\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2649\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06c.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/02\/DL2102Mk06c-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p>#donluc #meditation #glassesmeditation #glassesledmeditation #neopixels #audioplayer #microsd #arduino #sparkfun #project #programming #electronics #microcontrollers #consultant #patreon #videoblog<\/p>\n<p><strong>TMRpcm <\/strong><\/p>\n<p>PCM(Pulse Width Modulation)\/WAV playback direct from SD card<br \/>\n<strong>Samples Per second(Hz):<\/strong> 16000<br \/>\n<strong>Main formats:<\/strong> WAV files, 8-bit, 8-32khz Sample Rate, mono.<\/p>\n<p><strong>Voice:<\/strong> Yes<br \/>\n<strong>Music:<\/strong> No \/ Yes<\/p>\n<p><strong>Qwiic MP3 Trigger<\/strong><\/p>\n<p>The Qwiic MP3 Trigger is designed to operate at 3.3V and must not be powered above 3.6V as this is the maximum operating voltage of microSD cards. Otherwise, the board can also be powered through the Qwiic connector.<\/p>\n<p><strong>MP3 and ATtiny84<\/strong><\/p>\n<p>At the heart of the Qwiic MP3 Trigger is the WT2003S MP3 decoder IC. This IC reads MP3s from the microSD card and will automatically mount the SD card as a jump drive if USB is detected. The ATtiny84A receives I2C commands and controls the MP3 decoder.<\/p>\n<p><strong>Audio Amplifier<\/strong><\/p>\n<p>The speaker is boosted by a Class-D mono amplifier capable of outputting up to 1.4W. Both outputs have volume controlled by the SET_VOLUME command and is selectable between 32 levels.<\/p>\n<p><strong>Audio Outputs<\/strong><\/p>\n<p>This is a friction fit type connector; simply push stranded core wire into the hole and the connector will grip the wire, speaker as Dayton audio reference 3&#8243; full-range drive.<\/p>\n<p><strong>Voice:<\/strong> Yes<br \/>\n<strong>Music:<\/strong> Yes<\/p>\n<p><strong>DL2102Mk06<\/strong><\/p>\n<p>1 x SparkFun RedBoard Qwiic<br \/>\n2 x Breadboard-friendly RGB Smart NeoPixel<br \/>\n1 x SparkFun Qwiic MP3 Trigger<br \/>\n1 x microSD Card &#8211; 2GB<br \/>\n2 x Panel Mount 1K potentiometer<br \/>\n2 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 \/>\n17 x Wire Solid Core &#8211; 22 AWG<br \/>\n1 x Half-Size Breadboard<br \/>\n1 x SparkFun Cerberus USB Cable<\/p>\n<p><strong>SparkFun RedBoard Qwiic<\/strong><\/p>\n<p>PO0 &#8211; Analog A0<br \/>\nPO1 &#8211; Analog A1<br \/>\nNP1 &#8211; Digital 6<br \/>\nI2C &#8211; 0x37<br \/>\nVIN &#8211; +5V<br \/>\nGND &#8211; GND<\/p>\n<p><strong>DL2102Mk06p.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\/\/ #17 - Meditation - Glasses LED Meditation - SparkFun Qwiic MP3 Trigger - Mk03\r\n\/\/ 02-06\r\n\/\/ DL2102Mk06p.ino 17-03\r\n\/\/ 1 x Arduino Pro Mini 328 - 5V\/16MHz\r\n\/\/ 2 x Breadboard-friendly RGB Smart NeoPixel\r\n\/\/ 1 x SparkFun Qwiic MP3 Trigger\r\n\/\/ 1 x microSD Card - 2GB\r\n\/\/ 2 x Panel Mount 1K potentiometer\r\n\/\/ 2 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 - 16 AWG\r\n\/\/ 17 x Wire Solid Core - 22 AWG\r\n\/\/ 1 x Half-Size Breadboard\r\n\/\/ 1 x SparkFun Cerberus USB Cable\r\n\r\n\/\/ Include the Library Code\r\n\/\/ NeoPixel\r\n#include &lt;Adafruit_NeoPixel.h&gt;\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\/\/ NeoPixels\r\n#define PIN 6\r\n\/\/ How many NeoPixels are attached to the Arduino\r\n#define NUMPIXELS 2\r\nAdafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);\r\n\/\/ Color\r\n\/\/ Red\r\nint red = 0;\r\n\/\/ Green\r\nint green = 0;\r\n\/\/ Blue\r\nint blue = 0;\r\n\/\/ Panel Mount 1K potentiometer\r\n\/\/ Brighten\r\nconst int iSensorBrighten = A0;\r\n\/\/ Max - Min\r\nint BrightenValue = 0;\r\n\/\/ Minimum sensor value\r\nint BrightenMin = 0;\r\n\/\/ Maximum sensor value\r\nint BrightenMax = 1023;\r\n\/\/ Color\r\nconst int iSensorColor = A1;\r\nint y = 0;\r\nint ColorVal = 0;\r\n\r\n\/\/ SparkFun MP3 Trigger\r\nMP3TRIGGER mp3;\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;17-03&quot;;\r\n\r\nvoid loop() {\r\n\r\n  \/\/ Range Color\r\n  isRangeColor();\r\n\r\n  if (mp3.isPlaying() == false) {\r\n\r\n    \/\/ Play Track dleMk002.mp3\r\n    mp3.playTrack(1);\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    \/\/ Qwiic MP3 failed to respond. Please check wiring and possibly the I2C address. Freezing...\r\n    while (1);\r\n  }\r\n\r\n  if (mp3.hasCard() == false)\r\n  {\r\n    \/\/ Qwiic MP3 is missing its SD card. Freezing...\r\n    while (1);\r\n  }\r\n\r\n  \/\/ Volume can be 0 (off) to 31 (max)\r\n  mp3.setVolume(28);\r\n\r\n  \/\/ Play Track dleMk002.mp3\r\n  mp3.playTrack(1);\r\n  \r\n}\r\n<\/pre>\n<p><strong>getNeopix.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Neopix\r\nvoid isNeopix() {\r\n  \r\n  for(int i=0; i&lt;NUMPIXELS; i++){\r\n\r\n    \/\/ Neopix\r\n    \/\/ Read the Brightneed\r\n    BrightenValue = analogRead( iSensorBrighten );\r\n\r\n    \/\/ Apply the calibration to the BrightneedValue reading\r\n    BrightenValue = map(BrightenValue, BrightenMin, BrightenMax, 0, 255);\r\n\r\n    \/\/ In case the sensor value is outside the range seen during calibration\r\n    BrightenValue = constrain(BrightenValue, 0, 255); \r\n    \r\n    \/\/ The pixels.Color takes RGB values, from 0,0,0 up to 255,255,255\r\n    pixels.setBrightness( BrightenValue );\r\n    pixels.setPixelColor(i, pixels.Color(red,green,blue));\r\n    \/\/ This sends the updated pixel color to the hardware\r\n    pixels.show();\r\n \r\n  }\r\n  \r\n}\r\n\/\/ Range Color\r\nvoid isRangeColor() {\r\n\r\n  \/\/ Range Color\r\n  ColorVal = analogRead( iSensorColor );\r\n  y = (ColorVal \/ 127);\r\n  \r\n  switch (y) {\r\n    case  0:\r\n      \/\/ Blue\r\n      red = 0;\r\n      green = 102;\r\n      blue = 204;        \r\n      isNeopix();\r\n      break;\r\n    case 1:\r\n      \/\/ Yellow\r\n      red = 255;\r\n      green = 255;\r\n      blue = 0;        \r\n      isNeopix();\r\n      break;\r\n    case 2:\r\n      \/\/ Pink\r\n      red = 255;\r\n      green = 153;\r\n      blue = 203;        \r\n      isNeopix();\r\n      break;\r\n    case 3:\r\n      \/\/ White\r\n      red = 255;\r\n      green = 255;\r\n      blue = 255;        \r\n      isNeopix();\r\n      break;  \r\n    case 4:\r\n      \/\/ Green\r\n      red = 0;\r\n      green = 255;\r\n      blue = 0;        \r\n      isNeopix();\r\n      break;\r\n    case 5:\r\n      \/\/ Orange\r\n      red = 255;\r\n      green = 102;\r\n      blue = 0;        \r\n      isNeopix();\r\n      break;\r\n    case 6:\r\n      \/\/ Violet\r\n      red = 204;\r\n      green = 102;\r\n      blue = 204;        \r\n      isNeopix();\r\n      break;     \r\n    case 7:\r\n      \/\/ Red\r\n      red = 255;\r\n      green = 0;\r\n      blue = 0;        \r\n      isNeopix();\r\n      break; \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   \/\/ This initializes the NeoPixel library\r\n   pixels.begin();\r\n\r\n   \/\/ Serial\r\n   \/\/ Serial.begin(9600);\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><strong>Music<\/strong><\/p>\n<p>dleMk002.mp3<\/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<\/strong><br \/>\nhttps:\/\/www.donluc.com\/DLE\/LucPaquinCVEngMk2021a.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>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; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; #donluc #meditation #glassesmeditation #glassesledmeditation #neopixels #audioplayer #microsd #arduino #sparkfun #project #programming #electronics #microcontrollers #consultant #patreon #videoblog TMRpcm PCM(Pulse Width Modulation)\/WAV playback direct from SD card Samples Per second(Hz): 16000 Main formats: WAV files, 8-bit, 8-32khz Sample Rate, mono. Voice: Yes Music: No \/ Yes Qwiic MP3 Trigger The Qwiic MP3 Trigger &#8230; <a title=\"#17 &#8211; Meditation &#8211; Glasses LED Meditation &#8211; SparkFun Qwiic MP3 Trigger &#8211; Mk03\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=2645\" aria-label=\"Read more about #17 &#8211; Meditation &#8211; Glasses LED Meditation &#8211; SparkFun Qwiic MP3 Trigger &#8211; Mk03\">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":[135,47,50,38,59,5,138,58,10,43],"tags":[86,6,102,4,19,85,136,143,24,27,109,142,33,34,108],"class_list":["post-2645","post","type-post","status-publish","format-standard","hentry","category-meditation","category-adafruit","category-arduino","category-digitalelectronics","category-fritzing","category-microcontrollers","category-patreon","category-arduino-programming","category-projects","category-sparkfun","tag-adafruit","tag-arduino","tag-components","tag-consultant","tag-electronics","tag-fritzing","tag-meditation","tag-meditation-glasses-led","tag-microcontroller","tag-projects-2","tag-sparkfun","tag-sparkfun-qwiic-mp3-trigger","tag-technology","tag-video-blog","tag-vlog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2645","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=2645"}],"version-history":[{"count":2,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2645\/revisions"}],"predecessor-version":[{"id":2651,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2645\/revisions\/2651"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}