IOT Project Blinking LED by Clapping using Arduino UNO


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




34 views0 comments

Recent Posts

See All

IoT Ecosystem user layer से connectivity layer तक शुरू होने वाले विभिन्न IoT layers का एक combination है। Industry ग्रेड IoT ecosystems various architectural components में consist है like हार्डवेयर c