IR Infrared Obstacle Avoidance Sensor Module: 두 판 사이의 차이

아두위키 : Arduwiki
잔글편집 요약 없음
잔글편집 요약 없음
 
1번째 줄: 1번째 줄:
{{#seo:|title=아두위키 : 아두이노 적외선 장애물 감지 센서 가이드|title_mode=append|keywords=아두이노, 정보과학, 메이커학습, 수행평가, 적외선 장애물 감지 센서, 아두이노 작품, 캡스톤작품, 아두이노 예제코드|description=아두이노로 적외선 장애물 감지 센서를 제어하는 방법(기본정보, 회로, 예제 코드)을 소개합니다. 정보과학과 메이커수업에 활용가능합니다.}}
{{#seo:|title=ArduWiki: Arduino Infrared Obstacle Avoidance Sensor Guide|title_mode=append|keywords=Arduino, Computer Science, Maker Education, Performance Assessment, Infrared Obstacle Sensor, Arduino Project, Capstone Project, Arduino Example Code|description=How to use an infrared obstacle avoidance sensor with Arduino (basic info, wiring, sample code). Suitable for CS and maker education.}}
[[File:적외선 장애물 감지 센서 대표이미지.png|center|class=coders100]]
[[파일:적외선 장애물 감지 센서 대표이미지.png|center|class=coders100]]
 
Infrared obstacle detection sensor detects objects by reflecting infrared rays.
Infrared obstacle detection sensor detects objects by reflecting infrared rays.



2025년 3월 27일 (목) 18:34 기준 최신판

Infrared obstacle detection sensor detects objects by reflecting infrared rays.

The red part is the section that detects obstacles, and the yellow part is a variable resistor used to adjust sensitivity.

It is a module equipped with LEDs for power and detection status indication.

Specifications

  • Operating Voltage [V]: 3.3 ~ 5 (5 recommended)
  • Distance can be adjusted using a variable resistor
  • Digital output: LOW output when an obstacle is detected (HIGH output when no obstacle is detected)

Example hardware

  • Arduino board
  • Jumper cables
  • Infrared obstacle detection module

Connections

Arduino IR Sensor Module
5V VCC
GND GND
D7 OUT

Example code

Outputs 0 to the serial monitor when an obstacle is detected, and 1 otherwise.

#define out_pin 7

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

void loop() {
  Serial.print("out_pin: ");
  Serial.println(digitalRead(out_pin));
  delay(1000);
}

Execution result