Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO-Based Object Detection System with IR Sensor and Micro Servo

View and Edit Project In Cirkit DesignerImage of Arduino UNO-Based Object Detection System with IR Sensor and Micro Servo

Circuit Documentation

Summary

This circuit consists of an IR sensor, a Micro Servo 9G, and an Arduino UNO. The IR sensor detects objects and sends a signal to the Arduino UNO, which then controls the Micro Servo 9G based on the sensor input. The Arduino UNO also outputs the status of the object detection to the serial monitor.

Component List

IR Sensor

Micro Servo 9G

Arduino UNO

Wiring Details

IR Sensor

Micro Servo 9G

Arduino UNO

Code Documentation

Arduino UNO Code

void setup() 
{
  Serial.begin(9600);
  pinMode(6, INPUT);
  Serial.println("Serial Working");
}

void loop() 
{
  int ss = digitalRead(6);
  if (ss == LOW)
  {
    Serial.println("Object Detected");
  }
  else
  {
    Serial.println("Object Not Detected");
  }
}