User manual
72l Robotics experiment with PIC microcontroller
Activity 8
Reading the Line tracking sensor
In building Robo-PICA from activity 2, both of ZX-03 Infrared reflectors are installed
at the bottom of the robot body and connected to the sensor’s cable to RA0 and RA1
port pin. This activity is to write the program to read sensor’s value to display at the LCD
module of Robo-PICA.
A8.1 Write the Listing A8-1. Compile and download the code to Robo-PICA.
A8.2 Turn-off power and unplug the download cable from Robo-PICA.
A8.3 Place Robo-PICA on the white surface of the paper demonstration field which is
bundled with Robo-PICA kit. The position of both ZX-03 sensors must above the white
surface. Turn-on POWER switch. See the result at LCD screen and record it.
A8.4 Place Robo-PICA on the black line of the paper demonstration field . The position of
both ZX-03 sensors must above the black line. Turn-on POWER switch. See the result at LCD
screen and record it.
From testing can conclude the result as :
The white surface reading is during 400 to 900
The black surface reading is during 0 to 150
Thus, the reference value for making decision is during 150 to 400. You can select
the suitable value and make decision as :
If the sensor reading value more than the reference value, sensor detect
“WHITE surface”
If the sensor reading value less than the reference value, sensor detect
“BLACK surface or line”