Grove - I2C Color Sensor - Raw RGB to 255 RGB

Hi,

Few days ago, we had some projects with Grove - I2C Color Sensor. When we tried to read data from it, we got the RGB value is weight. I have remembered value of RGB is from 0 to 255, but values that we got from Grove - I2C Color Sensor is from ~10k ~ 20k

Could you help us or give us some information about raw RGB values from Grove - I2C Color Sensor. Best case is what are them and how can I convert it to 255 RGB

Thanks,
Chp.

Update: The value from Grove - I2C Color Sensor is from ~10k ~ 20km, when I use Vcc is 5V. I have just tried with Vcc 3.3V, the value of R,G,B is arround 2k-3k

Hello,

“Grove - I2C Color Sensor” should work similarly irrespective of VCC voltage – 3.3v or 5V. The design includes a LDO and Logic level converter to adapt to two different VCC voltages.

In the example code, the raw colour information is presented in int format. Please scale it down to 0-255 by Arduino map(value, fromLow, fromHigh, toLow, toHigh) function or by arithmetic divide.

If this solution does not help, please reply with photos of your setup, experiment etc…

Thanks