[vc_row][vc_column width=”1/1″][vc_column_text]LinkSprite path tracking sensor uses a reflective infrared sensor (tcrt500). The infrared light is emitted and reflected back to the receiver, it’s then inverted by 74LS14 and output to the output pin and the LED. The output signal is a digital signal.
There is 3 output pins: output signal, power supply and ground.
On a white surface, the output signal will be HIGH. On a black/non-reflective surface, the output signal will be low and the LED is off. The working distance from the sensor to the surface is around 1.5cm.
[/vc_column_text][vc_tour][vc_tab title=”Parts List” tab_id=”1389154823-1-86″][vc_column_text]1 x LinkSprite path tracking sensor
1 x pcDuino v2
Several Jump Wires[/vc_column_text][/vc_tab][vc_tab title=”Wire Diagram” tab_id=”1389154823-2-23″][vc_column_text]
+ of path sensor module -> 5.0V of pcDuino
– of path sensor module -> GND of pcDuino
S of path sensor module -> GPIO 0 of pcDuino
[/vc_column_text][/vc_tab][vc_tab title=”Sample Code” tab_id=”1389155304201-2-8″][vc_column_text]We use the included Arduino IDE in pcDuino:
Sample Code is below:
/*
* Path Sensor
*/
#include <core.h>
int PathPin = 0;
void setup(){
printf(“Path Sensor !\n”);
printf(“Using I/O_0: Path Sensor \n”);
pinMode(PathPin, INPUT);
}
void loop(){
int sensorValue = digitalRead(PathPin);
printf(“Value of Pin pathpin:%d\n”, sensorValue);
delay(100);
}[/vc_column_text][/vc_tab][vc_tab title=”Results” tab_id=”1389155622877-3-1″][vc_column_text]Click the left-point arrow to run the code on pcDuino, when there is reflective object under the sensor, the value will be 1, and there is no reflective object under the sensor, the value will be 00.
Leave a Reply
You must be logged in to post a comment.