Hackster is hosting Hackster Holidays, Ep. 4: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Wednesday!Stream Hackster Holidays, Ep. 4 on Wednesday!
mohammadsohail0008
Published © GPL3+

DIY Arduino Corner lamps

Corner Lamps controlled via clap

IntermediateFull instructions provided310
DIY Arduino Corner lamps

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Gravity: Analog Sound Sensor For Arduino
DFRobot Gravity: Analog Sound Sensor For Arduino
×1
Relay Module (Generic)
×1
Adafruit NeoPixel Digital RGB LED Strip 144 LED, 1m White
Adafruit NeoPixel Digital RGB LED Strip 144 LED, 1m White
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Schematics

Circuit Diagram

Code

Code

Arduino
// https://www.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g  //
// DIY Arduino Corner Lamp //
// By MOHD SOHAIL //

int relay = 4;
int soundsensor = 7; 
boolean state = false;

void setup()
{
pinMode(relay, OUTPUT);
pinMode(soundsensor, INPUT);
}

void loop(){
if (digitalRead(soundsensor) == LOW)
 {
  delay(100);
  state = !state;  //Toggle state value
  digitalWrite(relay, state); //set relay value to true or false.
  }
}

Credits

mohammadsohail0008

mohammadsohail0008

42 projects • 31 followers

Comments