Ad Code

Responsive Advertisement

Ticker

6/recent/ticker-posts

How to use an IR sensor with Arduino? | Arduino के साथ IR सेंसर का उपयोग कैसे करें | Simple Projects

  

How to use an IR sensor with Arduino? | Arduino के साथ IR सेंसर का उपयोग कैसे करें | Simple Projects





How to use an IR sensor with Arduino? | Arduino के साथ IR सेंसर का उपयोग कैसे करें | Simple Projects

Video Link: - Click Here For Video

IR Sensor Circuit: -




IR Sensor Programming: -


int IRSensor = 2; // connect ir sensor to arduino pin 2

int LED = 12; // conect Led to arduino pin 13


void setup() 

{

  pinMode (IRSensor, INPUT); // sensor pin INPUT

  pinMode (LED, OUTPUT); // Led pin OUTPUT

}


void loop()

{

  int statusSensor = digitalRead (IRSensor);

  

  if (statusSensor == 1)

  {

    digitalWrite(LED, LOW); // LED LOW

  }

  

  else

  {

    digitalWrite(LED, HIGH); // LED High

    delay(50);

  digitalWrite(LED, LOW); // LED LOW

  delay(50);

  }

  

}



Share, Support, and Subscribe!!! 1. PRO KAM EXPLAINED 2. Knowledge KAM 3. PRO KAM Follow us on 1. Facebook 2. Instagram 3. Pinterest 4. Blogspot 5 Twitter If you have any other ideas to make me design, you can describe them in the comment section and if I can, I will make a designing video on it. So I am waiting #prokam #pro #IDM #Solutions #Hack

Post a Comment

0 Comments

Ad Code

Responsive Advertisement