Anbumachi
Published © GPL3+

Touch Sensor and Sound Sensor Controlling AC/DC Lights

A touch sensor pad with sound sensor controlling AC/ DC lights.

IntermediateShowcase (no instructions)1,929
Touch Sensor and Sound Sensor Controlling AC/DC Lights

Things used in this project

Hardware components

Capacitive Touch Sensor Breakout - MPR121
Adafruit Capacitive Touch Sensor Breakout - MPR121
×1
General Purpose Transistor NPN
General Purpose Transistor NPN
×1
SparkFun Electret Microphone Breakout
SparkFun Electret Microphone Breakout
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Materia 101
Arduino Materia 101
DC Power Supply for 12V / Battery

Story

Read more

Custom parts and enclosures

NPN 2N4401 Transistor

Schematics

The image

Dsc 0280 nwaq2ply42

Code

ARDUINO code

C/C++
int soundSensor= A0;
int LED=11;
boolean LEDStatus=false;

void setup() {
 pinMode(soundSensor,INPUT);
 pinMode(LED,OUTPUT);

}

void loop() {

  int SensorData=digitalRead(soundSensor); 
  if(SensorData==1){

    if(LEDStatus==false){
        LEDStatus=true;
        digitalWrite(LED,HIGH);
    }
    else{
        LEDStatus=false;
        digitalWrite(LED,LOW);
    }
  }
 } 

Credits

Anbumachi

Anbumachi

1 project • 2 followers

Comments