Devices & Components
Arduino Nano
Relay Module (Generic)
Gravity: Analog Sound Sensor For Arduino
Adafruit NeoPixel Digital RGB LED Strip 144 LED, 1m White
Hardware & Tools
Hot glue gun (generic)
Software & Tools
Arduino IDE
Project description
Code
Code
arduino
1// https://www.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g // 2// DIY Arduino Corner Lamp // 3// By MOHD SOHAIL // 4 5int relay = 4; 6int soundsensor = 7; 7boolean state = false; 8 9void setup() 10{ 11pinMode(relay, OUTPUT); 12pinMode(soundsensor, INPUT); 13} 14 15void loop(){ 16if (digitalRead(soundsensor) == LOW) 17 { 18 delay(100); 19 state = !state; //Toggle state value 20 digitalWrite(relay, state); //set relay value to true or false. 21 } 22} 23
Downloadable files
Circuit Diagram
Circuit Diagram

Circuit Diagram
Circuit Diagram

Comments
Only logged in users can leave comments