The Alpha Geek – Geeking Out

#17 – Meditation – Glasses LED Meditation – Music Shield – Mk04

——

#donluc #meditation #glassesledmeditation #musicshield #neopixels #arduino #sparkfun #project #programming #electronics #microcontrollers #consultant #zoom #patreon #videoblog

——

Music Shield

——

Music Shield

——

Music Shield

——

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 cards with the provided Arduino Library.

Features

  • Arduino and Arduino Mega compatible
  • 2 control-push buttons and 1 knob switch
  • Plays music from micro SD cards
  • Decodes: MP3, WAV, MIDI, Ogg Vorbis
  • Fat16 library
  • I2S interface for external DAC
  • Headphone/Line Out for playback
  • Excellent sound quality with ±1dB frequency response

DL2102Mk07

1 x Arduino Uno – R3
1 x ProtoScrewShield
1 x Music Shield V1.1
2 x Breadboard-friendly RGB Smart NeoPixel
1 x microSD Card – 2GB
1 x Panel Mount 1K potentiometer
1 x Knob
1 x Momentary Button – Panel Mount (Black)
1 x 1K Ohm
1 x Hamburger Mini Speaker
15 x Wire Solid Core – 22 AWG
1 x Half-Size Breadboard
1 x SparkFun Cerberus USB Cable

Arduino Uno – R3

SW0 – Analog A4
PO0 – Analog A5
NP1 – Digital 1
MB0 – RST
VIN – +5V
GND – GND

DL2102Mk07p.ino

// ***** Don Luc Electronics © *****
// Software Version Information
// #17 - Meditation - Glasses LED Meditation - Music Shield - Mk04
// 02-07
// DL2102Mk07p.ino 17-04
// DL2102Mk07
// 1 x Arduino Uno - R3
// 1 x ProtoScrewShield
// 1 x Music Shield V1.1
// 2 x Breadboard-friendly RGB Smart NeoPixel
// 1 x microSD Card - 2GB
// 1 x Panel Mount 1K potentiometer
// 1 x Knob
// 1 x Momentary Button - Panel Mount (Black)
// 1 x 1K Ohm
// 1 x Hamburger Mini Speaker
// 15 x Wire Solid Core - 22 AWG
// 1 x Half-Size Breadboard
// 1 x SparkFun Cerberus USB Cable

// Include the Library Code
// NeoPixel
#include <Adafruit_NeoPixel.h>
// Fat 16
#include <Fat16.h>
#include <Fat16Util.h>
// New SPI
#include <NewSPI.h>
// Arduino
#include <arduino.h>
// Music Player
#include "pins_config.h"
#include "vs10xx.h"
#include "newSDLib.h"
#include "MusicPlayer.h"

// NeoPixels
#define PIN 1
// How many NeoPixels are attached to the Arduino
#define NUMPIXELS 2
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
// Color
// Red
int red = 0;
// Green
int green = 0;
// Blue
int blue = 0;
// Panel Mount 1K potentiometer
// Brighten
int BrightenValue = 0;
// Color
const int iSensorColor = A5;
int y = 0;
int ColorVal = 0;

// Mountable Slide Switch
int iSS1 = A4;
// State
int iSS1State = 0;

// Music Player
MusicPlayer myplayer;

// Software Version Information
String sver = "17-04";

void loop() {

  // Slide Switch
  // Read the state of the iSS1 value
  iSS1State = digitalRead(iSS1);

  // If it is the Slide Switch State is HIGH
  if (iSS1State == HIGH) {

    // Range Color
    isRangeColor();

  } else {

    // Add To Playlist
    myplayer.addToPlaylist("F001.mp3");
    myplayer.addToPlaylist("F002.mp3");
    myplayer.addToPlaylist("F003.mp3");
    myplayer.addToPlaylist("F004.mp3");
    myplayer.addToPlaylist("F005.mp3");
    // There are two songs in the playlist
    myplayer.playList();
    while(1);
    
  }

}

getNeopix.ino

// Neopix
void isNeopix() {
  
  for(int i=0; i<NUMPIXELS; i++){

    // Neopix
    // BrightenValue = 40
    BrightenValue = 40;
    pixels.setBrightness( BrightenValue );

    // The pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
    pixels.setPixelColor(i, pixels.Color(red,green,blue));
    
    // This sends the updated pixel color to the hardware
    pixels.show();
 
  }
  
}
// Range Color
void isRangeColor() {

  // Range Color
  ColorVal = analogRead( iSensorColor );
  y = (ColorVal / 127);
  
  switch ( y ) {
    case  0:
      // Blue
      red = 0;
      green = 102;
      blue = 204;        
      isNeopix();
      break;
    case 1:
      // Yellow
      red = 255;
      green = 255;
      blue = 0;        
      isNeopix();
      break;
    case 2:
      // Pink
      red = 255;
      green = 153;
      blue = 203;        
      isNeopix();
      break;
    case 3:
      // White
      red = 255;
      green = 255;
      blue = 255;        
      isNeopix();
      break;  
    case 4:
      // Green
      red = 0;
      green = 255;
      blue = 0;        
      isNeopix();
      break;
    case 5:
      // Orange
      red = 255;
      green = 102;
      blue = 0;        
      isNeopix();
      break;
    case 6:
      // Violet
      red = 204;
      green = 102;
      blue = 204;        
      isNeopix();
      break;     
    case 7:
      // Red
      red = 255;
      green = 0;
      blue = 0;        
      isNeopix();
      break; 
  }
  
}

setup.ino

// Setup
void setup() {
  
   // This initializes the NeoPixel library
   pixels.begin();
   delay(50);

   // Slide Switch
   pinMode(iSS1, INPUT);

   // Music Player
   // Will initialize the hardware and set default mode to be normal
   myplayer.begin();

}

Music

F001.mp3
F002.mp3
F003.mp3
F004.mp3
F005.mp3

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • Robotics
  • Research & Development (R & D)
  • Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc…)
  • Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc…)
  • Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc…)
  • Social Media Programming & Integration (Facebook, Twitter, YouTube, Pinterest, etc…)
  • Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc…)
  • Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc…)
  • eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc…)

Instructor

  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics
  • DOS, Windows, OSX, Linux, iOS, Android, Multi-OS
  • Linux-Apache-PHP-MySQL

Follow Us

J. Luc Paquin – Curriculum Vitae
https://www.donluc.com/DLE/LucPaquinCVEngMk2021a.pdf

Web: https://www.donluc.com/
Web: http://www.jlpconsultants.com/
Web: https://www.donluc.com/DLE/
Web: https://www.donluc.com/DLHackster/
Web: https://www.hackster.io/neosteam-labs
Web: https://zoom.us/
Patreon: https://www.patreon.com/DonLucElectronics
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories
Archives