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

아두위키 : Arduwiki
(Created page with "{{#seo:|title=아두위키 : 아두이노 적외선 장애물 감지 센서 가이드|title_mode=append|keywords=아두이노, 정보과학, 메이커학습, 수행평가, 적외선 장애물 감지 센서, 아두이노 작품, 캡스톤작품, 아두이노 예제코드|description=아두이노로 적외선 장애물 감지 센서를 제어하는 방법(기본정보, 회로, 예제 코드)을 소개합니다. 정보과학과 메이커수업에 활용가능합니다.}} ...")
 
잔글편집 요약 없음
 
54번째 줄: 54번째 줄:


=== Execution result ===
=== Execution result ===
Check the operating video from the [https://blog.naver.com/gongzipsa/223183407447 link].
<div class="coders70">
<youtube> xl-m-9syJPQ </youtube>
</div>

2024년 7월 10일 (수) 14:09 기준 최신판

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