I would like to fix the program I made earlier, because the movement of the robot had been knocking a little.
The radio button of "next action" will be set as "inertia".
[DOWNLOAD] Created Program 2(for the NXT software)
By doing this, that rotation through inertia even after the motor has stopped, the movement was knocking fade.
Here is the improved program further.
[DOWNLOAD] Created Program 3(for the NXT software)
Switch (branch) block is gone and add two loops instead.
I made the threshold of "white" would be"52". The count value of measured "white" is 62 minus 10.
I made the threshold of "black" would be "42". The count value of measured "black" is 32 plus 10.
In the previous program was to determine only one "threshold" for the black / white.
But this time, we will use two thresholds for detection in black and white for contrast detection.
That means "strictly a judgment" it is.
It increases certainty in the movement for the advantage, but the reaction is becoming dull for the disadvantage.