IR Sensor Arduino Code


 

void setup()

{

  pinMode(13,OUTPUT);

  pinMode(2,INPUT);

}


void loop()

{

  if (digitalRead(2)==HIGH)

  {

    digitalWrite(13,LOW);  

  }

  else 

  {

    digitalWrite(13,HIGH);

  } 

Comments

Popular posts from this blog

Arduino Code Car Parking System

Arduino Code