light-dancing-music

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 🙂

rainbowstrip-1-meter-a3800-800x800

HARDWARE

SOFTWARE

STEPS

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

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

DSC_0241

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
DSC_0285
DSC_0242 - Copy

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

sdfat

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

sdhc rainbow

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.

rukiddinme

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 😉

ezedited

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

, , , , , ,

Related Post

4737-Lao-Tzu-Quote-Music-in-the-soul-can-be-heard-by-the-universe

MP3 Shield vs Easy MP3 Shield

esp8266-14_shieldremoved

EasyMP3 Shield with WiFly Remote

Jpeg

How to Make your Line Following Robot Faster?

dsc00784 (1)

Lights Up Your Twitterland! :)

Leave a Reply

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