Shop OBEX P1 Docs P2 Docs Learn Events
What's the maximum output values for the colorpal sensor? — Parallax Forums

What's the maximum output values for the colorpal sensor?

brandanbrandan Posts: 52
edited 2017-11-27 05:16 in Propeller 1
I couldn't find it in the docs.

Comments

  • It's in the docs on page 1, although not spelled out explicitly:

    "Generates 24-bit color using onboard RGB LED."

    This means 255, 255, 255 for the RGB components. More to the point, however, and for the most accurate measurements, you will want to do a white balance and rescale your readings in such a way that your white specimen scales to 255, 255, 255 instead of something less.

    -Phil
  • Yeah know, I read that in the docs. The problem is that I saw numbers higher than 255.
  • Okay, I need to investigate this a little more, then. Tomorrow.

    -Phil
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2017-11-27 20:14
    Please pardon the delay: it's been while since I've looked at the ColorPAL's firmware.

    The ADC in the AVR micro used in the ColorPAL has ten bits of resolution. So the maximum value you can ever get for each color is 1023, or 3FF hex. I think you would have to shine a flashlight into the module or hold it up to the sun to get such a reading, though -- at least at the low-sensitivity setting. In normal use, the readings should be much lower. At the high-sensitivity setting, a saturated reading of 1023 would be more common.

    What is the maximum that you've seen?

    -Phil
  • Maybe like 290 I don't remember exactly.
Sign In or Register to comment.