[vc_row][vc_column width=”1/1″][vc_column_text]LinkSprite infrared roadblock sensor uses an integrated infrared transceiver. 74LS00 is used to construct a resonator. Adjust the potentiometer can adjust the frequency of the infrared light to be the center of receiver, i.e. 38kHz. Now the receiver is of highest sensitivity. Adjust the other potentimeter can adjust the transmit intensity to meet the requirement of sensing distance.
The ballback working distance is longer than 20cm.
There are four pins: enable, output signal, power, ground. Jumper can be used to always enable. When there is object/roadblock in front of the sensor, the LED will turn on, and the out signal will be HIGH.
1 x pcDuino V2
+ of Infrared Road Block Sensor -> 5V of pcDuino
– of Infrared Road Block Sensor -> GND of pcDuino
S of Infrared Road Block Sensor -> GPIO 0 of pcDuino
EN of Infrared Road Block Sensor -> GPIO 1 of pcDuino
EN is the enable signal of the infrared road block sensor. It is actively low. When it receives a low level signal, it will start to detect block.[/vc_column_text][/vc_tab][vc_tab title=”Sample Code” tab_id=”1389159759803-2-1″][vc_column_text]We use the included Arduino IDE in pcDuino:
int PathPin = 0;
int sensorValue = digitalRead(PathPin);
printf(“Value of Pin pathpin:%d\n”, sensorValue);
}[/vc_column_text][/vc_tab][vc_tab title=”Results” tab_id=”1389159919489-3-8″][vc_column_text]Click the left-point arrow to run the code on pcDuino, when there is no object in front of the sensor, the sensors output will be 1.
When there is object in front of the sensor, the sensors output will be 0.