Infrared Distance Sensor

Liam Brady

Infrared distance sensors are sensors that measure how far away an object is by shooting infrared light at the object and measuring how much light is reflected back. They output an analog current which can be read by the Arduino.

void setup() {
  Serial.begin(9600);
}

void loop() {
  int val = analogRead(A0);

  Serial.println(val);

  delay(100);
}

IR Sensor

Najlaa Niazi

IR SENSOR

Buzzer or LED

Arduino + Cable

2 male male wires

3 male/female wires


IRobstaclessensor.ino