Turn up your house party!
Tags: arduino, programming, coding, led
Published: 2018-08-22 06:55:40

---
title: Turn up your house party!
published: true
description: 
tags: Arduino,programming,coding,led
---
![“Crowd with raised arms in a colorful club in silhouette” by Matty Adame on Unsplash](https://thepracticaldev.s3.amazonaws.com/i/qfsyrqil3133mpj04jte.jpg)

##Are you a nerd who likes to party? 
Well, it’s high time you put your skills to some work. 
Turn up your house party with **Bass reactive led strip lights**. To get you a little excited, here is a demo..
{% youtube zgcKU52koAg %}

The procedure to get this done is easy and cheap, so, here we go.

####What you need?
1. Arduino Uno R3: [Buy here](https://www.amazon.in/Uno-ATmega328P-Compatible-ATMEGA16U2-Arduino/dp/B015C7SC5U/ref=sr_1_4?s=industrial&ie=UTF8&qid=1534869919&sr=1-4&keywords=arduino+uno+r3)
2. Sound Sensor: [Buy here](https://www.amazon.in/Core-Technologies-Sound-Sensor-Module/dp/B01HHYMK7C?tag=googinhydr18418-21&tag=googinkenshoo-21&ascsubtag=657bf44d-1ee0-4eb7-8e33-61abc0ebfe6a)
3. Led Strip lights 12V (AC power adapter included): [Buy here](https://www.amazon.in/gp/product/B016SMPFI0/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1)
4. Jumper Cables: [Buy here](https://www.amazon.in/Jumper-Wires-Male-female-Pieces/dp/B00ZYFX6A2/ref=sr_1_3?ie=UTF8&qid=1534876767&sr=8-3&keywords=Jumper+cables)
5. IRF540 N-Channel Power MOSFET: [Buy here](https://www.amazon.in/vasp-IRF540-N-Channel-Power-MOSFET/dp/B015WZF0VG/ref=sr_1_1?ie=UTF8&qid=1534876856&sr=8-1&keywords=irf540n)
    You can buy other mosfets aswell but go for the bulky ones (TO-220).
6. Breadboard: [Buy here](https://www.amazon.in/Generic-Elementz-Solderless-Piecesb-Circuit/dp/B00MC1CCZQ/ref=sr_1_3?ie=UTF8&qid=1534876993&sr=8-3&keywords=breadboards)
7. Speakers with sub-woofer: [Buy here](https://www.amazon.in/A110-2-1-Channel-Multimedia-Speakers/dp/B00E2OY9OS/ref=sr_1_9?s=electronics&ie=UTF8&qid=1534882915&sr=1-9&keywords=fenda+speakers)


There is no need to stick to the links that I have mentioned, do what your pocket allows.

**NOTE**: The sound sensor picks up the bass and therefore has to be kept close to sub-woofer. **As close as possible**.

####Circuit
![“Crowd with raised arms in a colorful club in silhouette” by Matty Adame on Unsplash](https://thepracticaldev.s3.amazonaws.com/i/qjdquj9e5ewpxh0cj33z.gif)

Now it is time to wire your project up! The following diagram shows all of the connections. These are the direct connections for the sake of simplicity, the number of wires on your actual project may vary since you will be using a breadboard and literally connecting wire to wire.

Use your 9 V wall adapter (that you got with the LED strip) to power the Arduino (plug it into the black component on the lower left side of the Arduino)

####Arduino Code
I am assuming that you know the basics of Arduino. Not a problem even if you don’t. You can refer the beginner’s guide [here](http://forefront.io/a/beginners-guide-to-arduino/).

If you still struggle with Arduino, just connect the AO pin of the sound sensor to the Gate pin of the mosfet. If not, let’s talk code.

```c

#include <SoftwareSerial.h>
#define SS_output 7
#define LEDstrip 3
#define LEDstrip1 5
#define LEDstrip2 6
void setup()
{
  pinMode(SS_output, INPUT); //AO of the Sound Sensor connected to Analog Pin 7
  pinMode(LEDstrip, OUTPUT);
  pinMode(LEDstrip1, OUTPUT);
  pinMode(LEDstrip2, OUTPUT);
}
//This loop gets the sound sensor readings and forwards them to thed LED strip
void loop()
{
  int soundstate = analogRead(SS_output);
    analogWrite(LEDstrip, soundstate);
    analogWrite(LEDstrip1, soundstate);
    analogWrite(LEDstrip2, soundstate);
}

```

And that brings you to the end. Pick a song and chill.

If you like this, buy me a beer someday!