DIY Projects
Published © CC BY

How to use IR sensor with Arduino? (With full code) || Bihar

Hello Friends, In this video How to use IR sensor with Arduino? (With full code)

BeginnerShowcase (no instructions)1 hour72,235
How to use IR sensor with Arduino? (With full code) || Bihar

Things used in this project

Story

Read more

Schematics

Daigram

Code

Arduino code

C/C++
// BIHARI LIFEHACKER
void setup()
{
  pinMode(13,OUTPUT);
  pinMode(3,INPUT);
  Serial.begin(9600);
}
void loop()
{
  if (digitalRead(3)== LOW)
  {
    digitalWrite(13,HIGH);
    
    delay(10);
  }
  else 
  {
    
    digitalWrite(13,LOW);
    delay(10);
    
  }
  
}

Credits

DIY Projects

DIY Projects

11 projects • 21 followers
Student

Comments