Arduino Music Reactive Leds

by Random Creations in Circuits > Art

534 Views, 3 Favorites, 0 Comments

Arduino Music Reactive Leds

TECO Logo (1).png

Hello Friends!

This is my first instuctabel and that is about on Diy arduino Music Reactive leds.

so let's get staaaarted!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Required Materials

images (1) fff.jpg
download (2).jpg
download (3).jpg

1. Arduino Uno R3(or any other compatible).

2. Leds(1.2,3 Optional).

3. cable to connect arduino with pc.

4. Breadboard

5. 10k,4.7k resistors

6. Mic

and a pc or laptop.

Wiring & Connections

Circuit Diagram.png

Circuit is not complicated it is very esy just do as in picture.

pin A0 input

Code

just copy from below.

/////////////////Hamza Rehman\\\\\\\\\\\\\\\\
/////////////////////////Art of Tech\\\\\\\\\\\\\\\\\\

int music = A0; int output,a; int potval=A1; int number_of_led[20] = { 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,32,33,34,35,36,37,38,39,40,41}; // Assign the pins for the leds void setup() { for (a = 0; a < 20; a++) pinMode(number_of_led[a], OUTPUT); }

void loop() { potval=analogRead(A1); output = analogRead(music); potval=map (potval,0,1024,5,40); output = output/potval;

if (output == 0) { for(a = 0; a < 20; a++) { digitalWrite(number_of_led[a], LOW); } } else { for (a = 0; a < output; a++) { digitalWrite(number_of_led[a], HIGH); } for(a = a; a < 20; a++) { digitalWrite(number_of_led[a], LOW); } } }

Video Guide

How to make voice reacted leds with arduino without sound sensor!Let's do it!!!!!!!!

This is my own video from Art of Tech.