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

  1. 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.

TxRx
ESP8266 Wifi ShieldD3D2
Easy MP3 ShieldD9D8

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

Rainbow StripEasy MP3 Shield
DinPin 6
VinVin
GndGnd

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!

8. Copy the sample code and paste it into your Arduino sketch.

9. Choose the correct COM Port.

10. Then go to Tools>Boards>CT ARM. *If you are using different board, choose the correct one.

11. Compile and upload the sketch. Open serial monitor. Make sure baud rate is  115200.

12. Connect your phone to ESPShield Wifi > Open Wifly apps>Enter the correct IP Address and Port Number> Click Connect> Click ^

13. Enjoy the song!

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.

Video

BUY

, , , , , ,

Related Post

MP3 Shield vs Easy MP3 Shield

EasyMP3 Shield with WiFly Remote

How to Make your Line Following Robot Faster?

Lights Up Your Twitterland! :)

Leave a Reply

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