Before building the machine we need to understand how
the NXT reads brick colors.
The assembly below drives a conveyor that will pass bricks under the
light sensor.
Then the NXT brick will display the highest light reading for the
brick being tested.

The NXT program CSP_01 is a
modified version of the program found
here. Extra programming was added so that the highest
reading by the light sensor will remain on the screen until the
touch sensor is pushed resetting the displayed "High" value.
NOTE: This .rbt file has a couple Insane
warnings, but the program appears to work correctly. If you see
what is wrong with the program please
contact
us.
Test Data:
Values were generated from the Intensity terminal on the
light sensor program block.
|
 |
|
Green |
38 |
37 |
38 |
38 |
38 |
|
Blue |
37 |
38 |
39 |
39 |
37 |
| Black |
38 |
41 |
39 |
38 |
40 |
|
Gray |
55 |
52 |
51 |
54 |
52 |
|
Red |
58 |
58 |
60 |
59 |
59 |
|
Tan |
59 |
61 |
59 |
59 |
60 |
|
Yellow |
62 |
64 |
63 |
64 |
64 |
|
White |
64 |
66 |
65 |
66 |
65 |
As shown in the table above
it will be near impossible for the NXT to tell the difference
between Red and Tan based on the research data. Perhaps the Raw
Number port on the light sensor program terminal block will help
to properly identify bricks.
Additional Photos:
The extended sensor shielding
seemed to improve readings a bit, but it did not help the
overlapping data numbers.


Please Visit our Store:
http://stores.ebay.com/dndbricks
or