Infrared Line Tracing Module(TCRT5000): 두 판 사이의 차이
(Created page with "{{#seo:|title=아두위키 : 아두이노 적외선 라인트레이싱 모듈(TCRT5000) 가이드|title_mode=append|keywords=아두이노, 정보과학, 메이커학습, 수행평가, 적외선 라인트레이싱 모듈(TCRT5000), 아두이노 작품, 캡스톤작품, 아두이노 예제코드|description=아두이노로 적외선 라인트레이싱 모듈(TCRT5000)을 제어하는 방법(기본정보, 회로, 예제 코드)을 소개합니다. 정보과학과 메이커...") |
(차이 없음)
|
2024년 3월 24일 (일) 16:13 판

The product is an infrared transmission and reception sensor module designed specifically for line tracing applications. It comes equipped with an adjustable variable resistor, allowing for fine-tuning of sensitivity.

The part of the sensor that detects is highlighted in red in the accompanying image, while the yellow part represents the sensitivity adjustment component.
Specifications
- Operating Voltage: 3V ~ 5V
- Output Type: Analog, Digital
Example Required Hardware
- Arduino board
- Jumper cables
- TCRT5000 module
Connection
| Arduino | TCRT5000 |
| 5V | V+ |
| GND | G |
| D2, A7 | S |

Example Code
const int analogPin = A7; // Analog pin used to connect the sensor
const int digitalPin = 2; // Digital pin used to connect the sensor
void setup() {
pinMode(digitalPin, INPUT); // Set the digital pin as input
Serial.begin(9600); // Start serial communication at 9600 baud
}
void loop() {
Serial.print(analogRead(analogPin)); // Read the analog value from the sensor
Serial.print("\t"); // Print a tab for formatting
Serial.println(digitalRead(digitalPin)); // Read and print the digital value from the sensor
delay(100); // Wait for 100 milliseconds before the next reading
}
Execution Results
- When nothing is close to the sensor

- When a black object is near the sensor

- When a white object is near the sensor
