Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
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,286
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
11 projects • 21 followers
Student
Contact

Comments

Please log in or sign up to comment.