{"id":2653,"date":"2021-03-08T07:42:04","date_gmt":"2021-03-08T15:42:04","guid":{"rendered":"http:\/\/www.donluc.com\/?p=2653"},"modified":"2021-03-08T07:42:04","modified_gmt":"2021-03-08T15:42:04","slug":"17-meditation-glasses-led-meditation-music-shield-mk04","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=2653","title":{"rendered":"#17 &#8211; Meditation &#8211; Glasses LED Meditation &#8211; Music Shield &#8211; Mk04"},"content":{"rendered":"<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-2653-1\" width=\"720\" height=\"480\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#donluc #meditation #glassesledmeditation #musicshield #neopixels #arduino #sparkfun #project #programming #electronics #microcontrollers #consultant #zoom #patreon #videoblog<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07a.png\" alt=\"Music Shield\" width=\"720\" height=\"683\" class=\"alignnone size-full wp-image-2655\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07a.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07a-300x285.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\/03\/DL2102Mk07b.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07b.png\" alt=\"Music Shield\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2656\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07b.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07b-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\/03\/DL2102Mk07c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07c.png\" alt=\"Music Shield\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2657\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07c.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/03\/DL2102Mk07c-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>Music Shield V1.1<\/strong><\/p>\n<p>The Music Shield is a professional audio codec.It can work with Arduino and Arduino Mega. It is based on VS1053b IC, and can play a variety of music formats stored on MicroSD cards with the provided Arduino Library.<\/p>\n<p><strong>Features<\/strong><\/p>\n<ul>\n<li>Arduino and Arduino Mega compatible<\/li>\n<li>2 control-push buttons and 1 knob switch<\/li>\n<li>Plays music from micro SD cards<\/li>\n<li><strong>Decodes:<\/strong> MP3, WAV, MIDI, Ogg Vorbis<\/li>\n<li>Fat16 library<\/li>\n<li>I2S interface for external DAC<\/li>\n<li>Headphone\/Line Out for playback<\/li>\n<li>Excellent sound quality with \u00b11dB frequency response<\/li>\n<\/ul>\n<p><strong>DL2102Mk07<\/strong><\/p>\n<p>1 x Arduino Uno &#8211; R3<br \/>\n1 x ProtoScrewShield<br \/>\n1 x Music Shield V1.1<br \/>\n2 x Breadboard-friendly RGB Smart NeoPixel<br \/>\n1 x microSD Card &#8211; 2GB<br \/>\n1 x Panel Mount 1K potentiometer<br \/>\n1 x Knob<br \/>\n1 x Momentary Button &#8211; Panel Mount (Black)<br \/>\n1 x 1K Ohm<br \/>\n1 x Hamburger Mini Speaker<br \/>\n15 x Wire Solid Core &#8211; 22 AWG<br \/>\n1 x Half-Size Breadboard<br \/>\n1 x SparkFun Cerberus USB Cable<\/p>\n<p><strong>Arduino Uno &#8211; R3<\/strong><\/p>\n<p>SW0 &#8211; Analog A4<br \/>\nPO0 &#8211; Analog A5<br \/>\nNP1 &#8211; Digital 1<br \/>\nMB0 &#8211; RST<br \/>\nVIN &#8211; +5V<br \/>\nGND &#8211; GND<\/p>\n<p><strong>DL2102Mk07p.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 - Music Shield - Mk04\r\n\/\/ 02-07\r\n\/\/ DL2102Mk07p.ino 17-04\r\n\/\/ DL2102Mk07\r\n\/\/ 1 x Arduino Uno - R3\r\n\/\/ 1 x ProtoScrewShield\r\n\/\/ 1 x Music Shield V1.1\r\n\/\/ 2 x Breadboard-friendly RGB Smart NeoPixel\r\n\/\/ 1 x microSD Card - 2GB\r\n\/\/ 1 x Panel Mount 1K potentiometer\r\n\/\/ 1 x Knob\r\n\/\/ 1 x Momentary Button - Panel Mount (Black)\r\n\/\/ 1 x 1K Ohm\r\n\/\/ 1 x Hamburger Mini Speaker\r\n\/\/ 15 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\/\/ Fat 16\r\n#include &lt;Fat16.h&gt;\r\n#include &lt;Fat16Util.h&gt;\r\n\/\/ New SPI\r\n#include &lt;NewSPI.h&gt;\r\n\/\/ Arduino\r\n#include &lt;arduino.h&gt;\r\n\/\/ Music Player\r\n#include &quot;pins_config.h&quot;\r\n#include &quot;vs10xx.h&quot;\r\n#include &quot;newSDLib.h&quot;\r\n#include &quot;MusicPlayer.h&quot;\r\n\r\n\/\/ NeoPixels\r\n#define PIN 1\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\nint BrightenValue = 0;\r\n\/\/ Color\r\nconst int iSensorColor = A5;\r\nint y = 0;\r\nint ColorVal = 0;\r\n\r\n\/\/ Mountable Slide Switch\r\nint iSS1 = A4;\r\n\/\/ State\r\nint iSS1State = 0;\r\n\r\n\/\/ Music Player\r\nMusicPlayer myplayer;\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;17-04&quot;;\r\n\r\nvoid loop() {\r\n\r\n  \/\/ Slide Switch\r\n  \/\/ Read the state of the iSS1 value\r\n  iSS1State = digitalRead(iSS1);\r\n\r\n  \/\/ If it is the Slide Switch State is HIGH\r\n  if (iSS1State == HIGH) {\r\n\r\n    \/\/ Range Color\r\n    isRangeColor();\r\n\r\n  } else {\r\n\r\n    \/\/ Add To Playlist\r\n    myplayer.addToPlaylist(&quot;F001.mp3&quot;);\r\n    myplayer.addToPlaylist(&quot;F002.mp3&quot;);\r\n    myplayer.addToPlaylist(&quot;F003.mp3&quot;);\r\n    myplayer.addToPlaylist(&quot;F004.mp3&quot;);\r\n    myplayer.addToPlaylist(&quot;F005.mp3&quot;);\r\n    \/\/ There are two songs in the playlist\r\n    myplayer.playList();\r\n    while(1);\r\n    \r\n  }\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    \/\/ BrightenValue = 40\r\n    BrightenValue = 40;\r\n    pixels.setBrightness( BrightenValue );\r\n\r\n    \/\/ The pixels.Color takes RGB values, from 0,0,0 up to 255,255,255\r\n    pixels.setPixelColor(i, pixels.Color(red,green,blue));\r\n    \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   delay(50);\r\n\r\n   \/\/ Slide Switch\r\n   pinMode(iSS1, INPUT);\r\n\r\n   \/\/ Music Player\r\n   \/\/ Will initialize the hardware and set default mode to be normal\r\n   myplayer.begin();\r\n\r\n}\r\n<\/pre>\n<p><strong>Music<\/strong><\/p>\n<p>F001.mp3<br \/>\nF002.mp3<br \/>\nF003.mp3<br \/>\nF004.mp3<br \/>\nF005.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>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; #donluc #meditation #glassesledmeditation #musicshield #neopixels #arduino #sparkfun #project #programming #electronics #microcontrollers #consultant #zoom #patreon #videoblog &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; Music Shield V1.1 The Music Shield is a professional audio codec.It can work with Arduino and Arduino Mega. It is based on VS1053b IC, and can play a variety of music formats stored on MicroSD &#8230; <a title=\"#17 &#8211; Meditation &#8211; Glasses LED Meditation &#8211; Music Shield &#8211; Mk04\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=2653\" aria-label=\"Read more about #17 &#8211; Meditation &#8211; Glasses LED Meditation &#8211; Music Shield &#8211; Mk04\">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,48,43],"tags":[86,6,102,4,19,85,136,24,144,9,27,145,109,33,34,108],"class_list":["post-2653","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-seeed-studio","category-sparkfun","tag-adafruit","tag-arduino","tag-components","tag-consultant","tag-electronics","tag-fritzing","tag-meditation","tag-microcontroller","tag-music-shield","tag-programming","tag-projects-2","tag-seeed-studio","tag-sparkfun","tag-technology","tag-video-blog","tag-vlog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2653","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=2653"}],"version-history":[{"count":3,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2653\/revisions"}],"predecessor-version":[{"id":4804,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2653\/revisions\/4804"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}