Description
The Parallax ColorPAL combines an RGB LED, a light sensor, and a microcontroller to make a color sensor that can also be used as an ambient light detector and a color generator. Readings are reported via a 1-wire asynchronous serial interface.
Overview
The ColorPAL from Parallax is a miniature color and light sensor that can double as a color generator with its RGB LED. When sensing color, the ColorPAL uses its LED to illuminate a sample one color component at a time while measuring the light reflected back with a broad-spectrum light-to-voltage converter. The amount of light reflected from the sample under illumination from each red, green, and blue LED can be used to determine the sample’s color. For the ColorPAL to detect the color of a subject, the subject must be reflective and non-fluorescent. The color of objects that emit light (e.g. LEDs) cannot be detected.
Features
Specifications
Communication
Communication with the ColorPAL takes place using serial I/O, transmitting and receiving at between 2400 and 7200 baud, using a non-inverted, open-drain protocol. The ColorPAL includes a pull-up resistor to Vdd, so you do not need to apply one externally. Because of the open-drain protocol, the pin used to communicate with the ColorPAL should always be configured as an input, except when being driven low.Also, when starting up, you should wait for this pin to be pulled high by the ColorPAL before trying to send it any commands. Please see the user’s manual (297k pdf) for more information.