Robojoy challenge class

2-4.Line tracing program

The chapter will be introduced for "NXT software" as the program development environment of Lego Mindstorms NXT.
I have been introduced for the "sensor" and "motor" in previous times. So, this time I will use both in combination, and I want to make a simple robot (Written by Takuya Matsubara).

Robot as easy to make is "line tracing robot". And line tracing robot is a robot trace the run on the line. Technology called "run on the line" this has been used actively in the world of robot competitions.

First, you assemble the robot. Please prepare one intelligent block, two motors and one light sensor.
The motor is connected to port A and port C output.

Light sensor is connected to an input port 1. We will use this sensor to determine the "white" and "black" of the floor.
Part of the red hat is from Minifigu. Because the NXT set for general does not contain this, please substitute similar parts.

In order to investigate the characteristics of the light sensor, I made a simple program using the NXT software first.
[DOWNLOAD] Created Program (for the NXT software)

When you run the program, the value of the light sensor will be displayed.
If the light the sensor get enough light (bright), the value will increase.

This is the results of the value using the line tracing sheet included with the product.
I see a difference of about 30 counts in the "white" and "black".

In addition, the distance of the light sensor and the floor surface is approximately in 7mm.

This is a graph showing the change of the measured values for the light sensor and the distance between the floor color (white).
Even the same "white", if the distance got a little different the measured value would change so much.
The sensor can not be measured properly if the distance is too close. It should be better the distance of a sensor is to keep as same as possible.