top of page

IOT Project Blinking LED by Clapping using Arduino UNO

  • Writer: Rajesh Singh
    Rajesh Singh
  • Jun 19, 2022
  • 1 min read

Step by Step by Procedure:

Arduino to Relay

Step 1: Connect Arduino GND pin to Relay GND pin.

Step 2: Arduino 5v to relay bcc

Step 3: Arduino digital pin 4 to relay pin 1

Step 4: Arduino pin 5 to relay pin 2.

Step 5: Arduino pin 6 to relay pin 6

Arduino to Sensor:

Step 1: Arduino GND pin to sensor GND pin.

Step 2: Arduino 5v to Sensor bcc

Step 3: Arduino pin 2 to digital output(D/O)


IOT Project Blinking LED by Clapping Code:

const int Sensor=2;

const int relay =4;

int x=0;

int y=0;

void setup()

{

pinMode(relay, OUTPUT);

pinMode(Sensor, INPUT);

}

void loop()

{

x=digitalRead(Sensor);

y=digitalRead(relay);

if(y==HIGH && x==LOW)

{

delay(250);

digitalWrite(relay,LOW)

}

if(y==LOW && x==LOW)

{

delay(250);

digitalWrite(relay, HIGH);

}

Video for IOT Project Blinking LED by Clapping using Arduino UNO




Recent Posts

See All
Soft skills-Personality Development MCQ

Q1. Which of the following is NOT a hard skill? A.    Typing Speed B.     Machine Operation C.     Time Management D.    Coding Ans: C Q2. What are/is essential concept(s) for M2M Communication succes

 
 
 
IOT Sensor MCQ

Sensor MCQ for O level Exam: Q1. Which sensor is used in Mobile phones? A.      Capacitive Touch Sensor B.      Temperature Sensor C.      Water Sensor D.      All of Above Ans: A Q2. If 1 means an ob

 
 
 
IOT Arduino MCQ

Building IOT Applications MCQ: Q1. Which Microcontroller is used in Arduino UNO prototyping board? A.    ATmega328m B.     ATmega328p C.     ATmega2560 D.    None of Above Ans: B Q2. What is the use o

 
 
 

1 Comment


joneskelly2528
Jul 15, 2022

Cenforce 50 mg (Sildenafil Citrate) - Beemedz

Cenforce 50mg is a medication that is used to treat erectile dysfunction. It is a phosphodiesterase type 5 inhibitor. Cenforce 50mg works by increasing the blood flow to the penis, making it easier to get and maintain an erection.


https://www.beemedz.com/cenforce-50-mg/

Like
bottom of page