Color Number Chart
The Color Number chart shows the relationship between the target color and the Color Number returned by the Color Sensor. Sensor Register Layout The color firmware supports the standard Lego company’s sensor memory model.
The Sensor version number field will report a revision number in the format “Vn.m” where n is the major version number and m is the revision level. Revision numbers will typically reflect the firmware level. The version number will be used to indicate the hardware level. The Manufacturer field will contain “HiTechnc”. The Sensor type field will contain “Color”. The Command field reserved for future use. The Color number field will return a single number color estimate. The Red, Green and Blue reading fields will return the current detection levels for the three color components. The Raw red, green and blue reading fields will return the current sensor analog signal levels for the three color components as 10 bit values. The Color Index Number field will return a single 6 bit number color index. Bits 5 and 4 encode the red signal level, bits 3 and 2 encode the green signal level and bits 1 and 0 encode the blue signal levels. The Normalized red, green and blue reading fields will return the current relative levels for the three color components. The normalization sets the highest value of the three Red, Green and Blue reading to 255 and adjusts the other two proportionately.
Other Programming Environments RobotC All features of the HiTechnic Color Sensor can be accessed using RobotC. For more information go to http://www-education.rec.ri.cmu.edu/robotc/.
NBC Next Byte Code (NBC) is a simple programming language that can access all Color Sensor features. For more information go to http://bricxcc.sourceforge.net/nbc/.
Notes:
|