3

I have the extra colorsensorblock used by mindcuber - ColorSensorRGB - installed. Now I'm trying to use it in my own projct. But what values does it produce?

It seems like it has a min-value of 0 (as expected), but some testing gave me a max-value of 395 (I was expecting 255).

What is the range of values delivered?

1 Answer 1

3

The returned values are the reflected light intensities for each of the three LED colors (red/green/blue).

The scale is actually 0-1023. Basically, this is the raw value returned by a 10-bit analog to digital converter in the color sensor (2 ^ 10 = 1024).

The LEDs themselves may not put out enough light that you could ever reach the maximum value, so you will have to calibrate the sensor accordingly. For example, your calibration could consist of holding the sensor close to a white sheet of paper and finding the maximum value for each color, then use those maximum values to normalize the actual sensor values to a scale of 0 to 100%.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.