The 5 Channel Infrared (IR) Array is an electronic component that consists of five IR sensors arranged in a linear array. This sensor array is designed to detect the presence and intensity of infrared light, which is often used in line-following robots, edge detection, and obstacle avoidance systems in robotics. The array can also be used for applications such as object alignment and motion detection.
Pin Number | Description |
---|---|
1 | VCC (Power Supply) |
2 | GND (Ground) |
3 | OUT1 (Channel 1) |
4 | OUT2 (Channel 2) |
5 | OUT3 (Channel 3) |
6 | OUT4 (Channel 4) |
7 | OUT5 (Channel 5) |
// Define the IR sensor pins
const int irPins[5] = {2, 3, 4, 5, 6};
void setup() {
// Initialize the IR sensor pins as inputs
for (int i = 0; i < 5; i++) {
pinMode(irPins[i], INPUT);
}
Serial.begin(9600);
}
void loop() {
// Read and print the state of each IR sensor
for (int i = 0; i < 5; i++) {
int sensorValue = digitalRead(irPins[i]);
Serial.print("Sensor ");
Serial.print(i + 1);
Serial.print(": ");
Serial.println(sensorValue);
}
delay(100); // Short delay before the next reading
}
Q: Can I use the 5 Channel IR Array with a 3.3V system?
A: Yes, most 5 Channel IR Arrays can operate at 3.3V, but always check the specifications for your particular model.
Q: How do I adjust the sensitivity of the sensors?
A: If your model has onboard potentiometers, you can turn them clockwise or counterclockwise to increase or decrease sensitivity, respectively.
Q: What is the maximum detection range of the sensors?
A: The range varies by model and is affected by the IR LED's intensity and the sensor's sensitivity. Check the datasheet for your specific model for precise figures.
Q: Can the sensors detect color?
A: No, IR sensors detect infrared light intensity and are not capable of distinguishing colors.