KY-033 Line Tracking Sensor Using Arduino

Line Tracking Sensor KY-033  with Arduino and Buzzer:

In this example, we will connect the line tracking sensor KY-033 with the Arduino to control a buzzer.

Component Required:

  • Line tracking sensor KY-033
  • Arduino UNO
  • 5V buzzer
  • 2 LEDs
  • 2 Resistors 220 ohm

KY-033 Arduino Circuit connection:






KY-033 Line Tracking Sensor Arduino Code:

#define sensor 2
#define buzzer 3
#define red 4
#define green 5

void setup() {
Serial.begin(9600);
pinMode(sensor,INPUT);
pinMode(buzzer,OUTPUT);
pinMode(green,OUTPUT);
pinMode(red,OUTPUT);


}

void loop() {
bool value = digitalRead(sensor);
if(value == 0)
{
  digitalWrite(buzzer, HIGH);
    digitalWrite(green, HIGH);
      digitalWrite(red, HIGH);

}
else
{
    digitalWrite(buzzer, LOW);
    digitalWrite(green, LOW);
      digitalWrite(red, LOW);
  }
}

Real-World Applications:

Line trackers are sensors that help robots detect and follow a line. They are useful for navigation, allowing robots to autonomously move around a predetermined path. Line trackers are commonly used in industrial robots and autonomous vehicles. The line following robots is commonly used for carry children through shopping malls, homes, entertainment places, industries






Written by Deenadarrshan Sathiyamoorthi



Comments