4 Channel Infrared Module Features
This module has 4 IR transmitter and receiver pairs that can be used to detect black and white color as well as obstacles. Each channel has digital voltage output. You can adjust the sensor’s sensitivity using the on board potentiometers.
You can see pinout of IR module in the image below.
Interfacing with Arduino
Step 1: Circuit
The following circuit shows how you should connect Arduino to IR module. Connect wires accordingly.
Step 2: Code
Upload the following code to your Arduino.
modified on 03 Oct 2020
by Mohammad Reza Akbari @ Electropeak
The code output is as follows. When sensor detects an obstacle or a white object, the output is LOW.