Music Reactive Led Using Arduino || Sound Sensor Tutorial

by rayankiwan63 in Circuits > Arduino

206 Views, 1 Favorites, 0 Comments

Music Reactive Led Using Arduino || Sound Sensor Tutorial

Music reactive Led || dancing led || arduino projects

Hello reader ! You've come to the right place. Its incredibly easy & I bet it won't take more than 5 minutes ! Alright, lets get started

Components Needed

music interactive led components.png

Arduino UNO

Breadboard

wires

LED

Sound sensor

Circuit Diagram / Connections

connections sound sensor.png

sensor connections

VCC -5V

GND-GND

D0- PIN3

LED:

POSTIVE -PIN7

NEGATIVE -GND

CODE

CODE FOR MUSIC INTERACTIVE LED.png

int soundsensor = 3;

int led = 7; // defining pin numbers

void setup()

{ pinMode (soundsensor, INPUT);

pinMode (led, OUTPUT);

}

void loop()

{ int sensorvalue = digitalRead (soundsensor);//if the sound intensity is higher than threshold which is set by us, //then sensor would return the value as 1

if (sensorvalue == 1)

{ digitalWrite(led, HIGH); }

else { digitalWrite(led, LOW); } }