Light Dancing with Music

This tutorial will show you how to sync rainbow strip to flash with the beat of your music. A few things that I want to point out is that, the setup will make the lights flash according on how you code the rainbow strip. Is this the best way to go about flashing lights with music? No, it is literally crude but hey, it will give you the satisfaction of playing around with Arduino codes especially for the beginner because it is super easy to learn and loads of fun!What is Rainbow Strip?

This is another LED strip, but is different type of LED. This LED strip is mounted with RainbowBit (WS2812B) LED. So if you know RainbowBit, you know it uses unique serial protocol to control each and every RGB LED in the line, and all your controller need is ONE digital output pin. Yes, a single pin to control as many RGB LED as you like 🙂

This tutorial will show you how to sync rainbow strip to flash with the beat of your music. A few things that I want to point out is that, the setup will make the lights flash according on how you code the rainbow strip. Is this the best way to go about flashing lights with music? No, it is literally crude but hey, it will give you the satisfaction of playing around with Arduino codes especially for the beginner because it is super easy to learn and loads of fun!What is Rainbow Strip?

This is another LED strip, but is different type of LED. This LED strip is mounted with RainbowBit (WS2812B) LED. So if you know RainbowBit, you know it uses unique serial protocol to control each and every RGB LED in the line, and all your controller need is ONE digital output pin. Yes, a single pin to control as many RGB LED as you like 🙂

HARDWARE

SOFTWARE

STEPS

Install WiFly Remote into your smart phone. You can download the app from ‘Play Store’.

2. Stack CT ARM, Easy MP3 Shield and ESP Wifi Shield together.

3. Take a look on which pins are Tx and Rx connecting to, we are going to use them for both shields.

Tx

Rx

ESP8266 Wifi Shield

D3

D2

Easy MP3 Shield

D9

D8

4. Then connect the rainbow strip according to the picture below. Make sure you connect with the right pins.

Rainbow Strip

Easy MP3 Shield

Din

Pin 6

Vin

Vin

Gnd

Gnd

5. Download SDFat file and paste it onto your MicroSD Card. Make sure to paste it in ‘root directory’ of your MicroSD Card.

6. Place your favorite songs inside the MP3 folder. Since this is a code based song, you need to code based on the music beat, I choose Star Sky(Instrumental) for the project song. The sample code provided is based on this song. You can download both sample code and music from here.

Then paste it on your MicroSD Card under the folder name “MP3”.

7. Plug in your earphone or speaker to DC jack on MP3 shield. Connect the boards to your PC using USB cable. Then you can start Arduino IDE!

In this tutorial, I was using Wifly remote apps to play music. However, you also can just press the buttons on EZMP3 Shield for that 😉

Code Overview

These are both the sample code and song for your reference. Don’t worry, you can play around with the codes and set it according to your favorite song 😉

Oh one more thing that I like about this rainbow strip is you can code the color simply by changing the rgb color codes in arduino sketches! You can easily find the rgb codes scattering around the internet and test it yourself.