<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">적외선 송수신기가 있어서 탐지 방향에서 물건을 만나면 적외선 수신기는</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">반사된 신호를 탐지한다. 효과적인 거리 범위는 20~30cm이며, 적정 전압은</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">3.3V~5V이다. 탐지 범위는 가변저항기로 조정할 수있으며, 로봇 충돌 회피,</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">라인 카운트, 흑백 라인 트랙킹 등에 사용할 수 있습니다.</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">&nbsp;</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">1. 물체를 감지하면 low 시그널을 OUT포트에 출력합니다.&nbsp; 2~30cm의 거리와</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">35도의 범위로 탐지하며 가변저항을 조정하여 탐지거리를 조정합니다.</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">&nbsp;</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">2. 센서 모듈 출력은 마이크로 컨트롤러의 IO 포트에 직접적으로 연결하거나</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">5V 릴레이에 직접연결될수 있습니다. VCC-VCC, GND-GND, OUT-IO</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">&nbsp;</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">3. comparator로 LM393칩을 사용합니다.</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">&nbsp;</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">4. 3-5V DC 파워를 사용하여. 파워가 공급되면 적색 led가 점등됩니다.</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">&nbsp;</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">5. 회로 크기 : 32mm * 14mm</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;"><span style="font-size: 12px;">&nbsp;</span></p>
<p style="padding: 0px; font-family: verdana; background-color: #ffffff;">&nbsp;</p>
<h6 style="margin-top: 0px; margin-bottom: 0px; padding: 0px; background-color: #ffffff;"><span style="font-size: 11px;">// IR Obstacle Collision Detection Module</span><br /><span style="font-size: 11px;">// Henry's Bench</span><br /><span style="font-size: 11px;">
int LED = 13; // Use the onboard Uno LED</span><br /><span style="font-size: 11px;">int isObstaclePin = 7;  // This is our input pin</span><br /><span style="font-size: 11px;">int isObstacle = HIGH;  // HIGH MEANS NO OBSTACLE</span><br /><span style="font-size: 11px;"><br /></span></h6>
<h6 style="margin-top: 0px; margin-bottom: 0px; padding: 0px; background-color: #ffffff;"><span style="font-size: 11px;">void setup() {</span><br /><span style="font-size: 11px;">&nbsp; pinMode(LED, OUTPUT);</span><br /><span style="font-size: 11px;">&nbsp; pinMode(isObstaclePin, INPUT);</span><br /><span style="font-size: 11px;">&nbsp; Serial.begin(9600);</span><br /><span style="font-size: 11px;">  }</span><br /><span style="font-size: 11px;"><br /></span></h6>
<h6 style="margin-top: 0px; margin-bottom: 0px; padding: 0px; background-color: #ffffff;"><span style="font-size: 11px;">void loop() {</span><br /><span style="font-size: 11px;">&nbsp; isObstacle = digitalRead(isObstaclePin);</span><br /><span style="font-size: 11px;">&nbsp; if (isObstacle == LOW)&nbsp;</span><span style="font-size: 11px;">{</span><br /><span style="font-size: 11px;">&nbsp; &nbsp; Serial.println("OBSTACLE!!, OBSTACLE!!");</span><br /><span style="font-size: 11px;">&nbsp; &nbsp; digitalWrite(LED, HIGH);</span><br /><span style="font-size: 11px;">&nbsp; }&nbsp;</span><span style="font-size: 11px;">else&nbsp;</span><span style="font-size: 11px;">{</span></h6>
<h6 style="margin-top: 0px; margin-bottom: 0px; padding: 0px; background-color: #ffffff;"><span style="font-size: 11px;">&nbsp; &nbsp; Serial.println("clear");</span><br /><span style="font-size: 11px;">&nbsp; &nbsp; digitalWrite(LED, LOW);</span><br /><span style="font-size: 11px;">&nbsp; }</span></h6>
<h6 style="margin-top: 0px; margin-bottom: 0px; padding: 0px; background-color: #ffffff;"><span style="font-size: 11px;">&nbsp; delay(200);</span><br /><span style="font-size: 11px;">}</span></h6>