Linkit ONE Sound Reactive LED

by apoorvtr in Circuits > Microcontrollers

569 Views, 0 Favorites, 0 Comments

Linkit ONE Sound Reactive LED

DSC00350.JPG

The following instructable presents a sound reactive LED. The intensity of LED is increased as the intensity of sound falling increases.

Materials

DSC00243.JPG
DSC00339.JPG
DSC00256.JPG
DSC00267.JPG
DSC00259.JPG
DSC00242.JPG

  • Linkit ONE
  • Battery
  • Sound Sensor
  • Transistor
  • LED
  • Jumper wires
  • Breadboard

Connect the Sensor

DSC00344.JPG
DSC00347.JPG
DSC00359.JPG

  1. Connect the Vcc pin of sensor to linkit one 5v.
  2. Connect the gnd pin of sensor to linkit one gnd.
  3. Connect the output pin of sensor to linkit one A0.

Connect the LED

DSC00342.JPG
DSC00343.JPG
  1. Connect positive terminal of LED to transistor Collector.
  2. Connect negative terminal of LED to transistor Gnd linkit
  3. Connect base of transistor to linkit D9
  4. Connect emitter of transistor to linkit 5v

Upload the Code

DSC00255.JPG

The code is:

void setup()

{

pinMode(9, OUPUT);

}

void loop()

{

int a = map(analogRead(A0), 400, 600, 50, 255)

analogWrite(2, a)

delay(100);

}

Test

DSC00349.JPG
DSC00353.JPG

After uploading the code, connect the battery and switch it on. Tap on the mic and you will see the LED glowing.