Oky Newstar Technology Co., Ltd
Oky Newstar Technology Co., Ltd

Starter Kits,Controller Board, Sensor Modules Factory

DIY Educational programmable Robot Projects manufacturer

Home News

How to Make LEDs Flash to Music with an Arduino: Step By Step Guide

I'm Online Chat Now
China Oky Newstar Technology Co., Ltd certification
China Oky Newstar Technology Co., Ltd certification
Customer Reviews
I've imported Arduino kits from Oky Newstar for several years now; the service of your team is outstanding. I think I can comfortably say I have been NEVER let down by you, which is incredible knowing how many big name companies there are right now in this industry.

—— Ms. Corrine -- America

Your team can always quickly understand and meet my requirement, I've been highly recommending your company to some friends, and I hope to have many more enjoyable business experiences with Oky Newstar.

—— Mr. Esteban --Spain

Company News
How to Make LEDs Flash to Music with an Arduino: Step By Step Guide
Latest company news about How to Make LEDs Flash to Music with an Arduino: Step By Step Guide

This guide is for tinkerers and for those who want to do some fun with their Arduino board. Arduino is an open-source prototyping board which can help in making not only the garage door openers or home surveillance systems, but it can also help in creating some funny stuff in your home or office. Today, I will provide a tutorial on how to make LEDs flash to the music of an MP3 on your system. The flashing of LEDs will be based on the frequency of the playing MP3 music.

Let’s directly jump to the tutorial without any further ado.


How to Make LEDs Flash to Music

There are four easy to follow steps to complete this Arduino Project. We will make a flashing circuit with attached LEDs and use an Arduino compatible music library and the Arduino IDE environment to analyze the frequency of music and give a response to different types of bits and blink LEDs accordingly.

Step-1: Gather the required tools and material

To complete any Arduino Project, you will need some useful components at first to avoid any last moment inconvenience.

required tools and material

Things you will need for this Arduino Music LED Project are:

  • An Arduino development board (Arduino UNO R3 or Duemilanove recommended)
  • LEDs as per your need and interest (take them of different colors to enjoy more)
  • One solderless breadboard
  • Resistors, Capacitors, MOSFET transistors
  • Power supply for Arduino (12V 5A)
  • A USB cable
  • Audio jack, speaker, audio cable
  • Connecting wires
  • A computer with Arduino software

Step-2: Connect all the components and build circuit

You have to make a small circuit design using Arduino, its accessories, and solderless breadboard to make the setup read music and blink LEDs in response.


Connect all components

As the inner rails and outer rails of the breadboard are connected through the lines, you can directly connect the components without messing with wires or using soldering iron.

Check these quick tips to create simple Arduino circuit:

  1. Connect the wire from the –outer rail of the breadboard to the Ground port of your Arduino board.
  2. Take three resistors (1K) and place them in the inner rails of the breadboard.
  3. Now, put the LEDs on the right side of the resistors (make sure to place them considering anode and cathode adequately).
  4. Connect the LED cathode rails and outer GND rails of the breadboard using wires.
  5. Complete the circuit by connecting the anode rails of the resistors to the digital pins of Arduino (12, 8, and 2).
  6. Connect the Arduino board with your computer using the USB cable. If the PC doesn’t start downloading the compatible drivers automatically, then you can manually do it from the official website.

The hardware part is done. Now, we will proceed to the software section.

Step-3: Set the Arduino script

Programming your development board for this Arduino music LEDs project is pretty simple. You just need to download and tweak with some coding scripts.

Set the Arduino script

  1. Open the browser on your PC and go to Arduino website.
  2. Download the Arduino IDE and extract it on your PC.
  3. Depending on your OS (Windows, Linux, or Mac), you need to download the processing software. After that, extract it where you kept the IDE files.
  4. Now, it is the time to download the Arduino Library for Processing (and Firmata). Copy it to your Arduino IDE/library folder.
  5. From the Arduino IDE folder, run the arduino.exe application.
  6. Open the file menu. Go to Examples, choose Firmata, and then select StandardFirmata.
  7. Click on the ‘upload’ button below the menu bar.
  8. Wait until the Arduino LEDs stop blinking.
  9. Download the code from pastebin and upload it on your Arduino.
  10. Reboot the system.

You can change the codes according to your needs and components you are using in this project.

Step-4: Make Arduino music

Make Arduino music

Now, attach your MP3 player and speakers to the Arduino using audio jack and cables. Connect the power supply, check everything at last and that’s it. The Arduino setup will get the music input and change the LED lights accordingly.


You can even customize the script with the help of minim JavaSound Library of Arduino. Apart from analyzing the Arduino music signals, you can also do some cool things due to the Processing of this library.

You can extend the Arduino Music LEDs blinking from your table to your whole room with the help of resistors, capacitors, and drivers. Try using different ways of using LEDs and see which type of setup give you more entertainment. You can even try this Arduino project while throwing a birthday party for your friends and look at their reactions.

What do you think about this project? Do you have anything other quicky-tweaky methods to make LEDs flash to music with an Arduino? Go the comment section below and share your words with the world.

About Arduino Geeks 18 Articles
I am a electronic geeks. I like to build robots and I really love Arduino. I started this website to write on Arduino stuffs and share with everyone. Please like and share our website.
Posted by Arduino Geeks
Pub Time : 2018-07-25 17:03:40 >> News list
Contact Details
Oky Newstar Technology Co., Ltd

Contact Person: Ms. Amy

Tel: +8618520830989

Fax: 86-755-23578861

Send your inquiry directly to us
Oky Newstar Technology Co., Ltd
Room1105, Block B, Chinto Technology Building, Minzhi Road, LongHua, ShenZhen city, GuangDong province, China
Mobile Site Privacy Policy | China Good Quality Starter Kit for Arduino Supplier. © 2013 - 2022 All Rights Reserved.