Compatible with Arduino? Colour Light Sensor Avago

I'm after an easy to program color light sensor, came across this on active-robot.com, is it compatible with the arduino?

Colour Light Sensor Avago ADJDS371-Q999

http://www.active-robots.com/products/sensors/sparkfun/8618.shtml

or should i go for the evaluation model? The ADJD-S371 http://www.active-robots.com/products/sensors/sparkfun/light-imaging.shtml

The q999 seems easier to hook up, as it does all the processing for you, but i cant find any example codes for it, anyone successfully hooked one up? Or know of any links

thnx

but i cant find any example codes for it,

Well do a google search there are a few examples of this in the forum.

I am in the process of using this:-

/* Colour Pegs - Mike Cook August 2009
 based on:-
 // Avago ADJD-S311-CR999 Color Sensor demo
// by Musashinodenpa (tf@musashinodenpa.com)

*/
// Modified version of the Wire libary that does not enable the internal pull up resistors
// To allow a 5V processor to talk to the 3V3 sensor, external pull ups are required
#include <WireOC.h>

// Define Constants 
#define chSel0 6    // channel select 0 pin
#define chSel1 7    // channel select 1 pin
#define COLOUR_SENSOR_ADDRESS 0x74       // 7bit

// CAP - controlls the number of capacitors on the input of the A/D
// in effect a gain setting for each sensor
// the bigger the number the more it takes to charge up the capacitors and the less sensitave it will be
// but the lower the noise
#define REG_CAP_RED       0x06
#define REG_CAP_GREEN     0x07
#define REG_CAP_BLUE      0x08
#define REG_CAP_CLEAR     0x09

// INT controlls the intergration time for each sensor 
// this is the time to gather light before making a measurement
// the longer it is the more sensitave but also the more prone to noise
#define REG_INT_RED_LO    0x0A
#define REG_INT_RED_HI    0x0B
#define REG_INT_GREEN_LO  0x0C
#define REG_INT_GREEN_HI  0x0D
#define REG_INT_BLUE_LO   0x0E
#define REG_INT_BLUE_HI   0x0F
#define REG_INT_CLEAR_LO  0x10
#define REG_INT_CLEAR_HI  0x11

// DATA - the registers containing the 8 bit readings from each sensor
#define REG_DATA_RED_LO   0x40
#define REG_DATA_RED_HI   0x41
#define REG_DATA_GREEN_LO 0x42
#define REG_DATA_GREEN_HI 0x43
#define REG_DATA_BLUE_LO  0x44
#define REG_DATA_BLUE_HI  0x45
#define REG_DATA_CLEAR_LO 0x46
#define REG_DATA_CLEAR_HI 0x47

byte Sensor_LED_Pin[] = { 2,3,4,5}; // pins controlling sensor LEDs
int r[4], g[4], b[4], c[4];   // Global arrays containing colours
boolean debug = true;         // change for debug printout

void set_register(unsigned char r, unsigned char v)
{
  Wire.beginTransmission(COLOUR_SENSOR_ADDRESS);
  Wire.send(r);
  Wire.send(v);
  Wire.endTransmission();
}

unsigned char read_register(unsigned char r)
{
  unsigned char v;
  Wire.beginTransmission(COLOUR_SENSOR_ADDRESS);
  Wire.send(r);  // register to read
  Wire.endTransmission();
  Wire.requestFrom(COLOUR_SENSOR_ADDRESS, 1); // read a byte
  while(!Wire.available()) {
    // waiting
  }
  v = Wire.receive();
  return v;
}

void setup(void)
{
  Wire.begin();
  Serial.begin(9600);
  // initilise illuminating LEDs
  for(int i = 0; i>0; i++){
  pinMode(Sensor_LED_Pin[i],OUTPUT);
  digitalWrite(Sensor_LED_Pin[i],LOW);
  }
  // I2C channel select multiplexers
   pinMode(chSel0,OUTPUT);
   pinMode(chSel1,OUTPUT);
   
  // sensor gain setting (Avago app note 5330)
  // CAPs are 4bit (higher value will result in lower output)
  set_register(REG_CAP_RED, 0x03);
  set_register(REG_CAP_GREEN, 0x03);
  set_register(REG_CAP_BLUE, 0x03);
  set_register(REG_CAP_CLEAR, 0x08);
  // INTs are 12bit (higher value will result in higher sensor value)
  set_register(REG_INT_RED_LO, 0xC4);
  set_register(REG_INT_RED_HI, 0x09);
  set_register(REG_INT_GREEN_LO, 0xC4);
  set_register(REG_INT_GREEN_HI, 0x09);
  set_register(REG_INT_BLUE_LO, 0xC4);
  set_register(REG_INT_BLUE_HI, 0x09);
  set_register(REG_INT_CLEAR_LO, 0xC4);
  set_register(REG_INT_CLEAR_HI, 0x09);
}

void loop()
{
  for(int ch = 0 ; ch<4; ch++){
  Read_Colour(ch); // read colour
    delay(999);
}
}

void Read_Colour(int ch)
{
  // select the channel
  ch = ch & 0x03;  // keep channel select to 2 bits only
  digitalWrite(chSel0,ch & 1);
  digitalWrite(chSel0,ch >> 1);
  
  digitalWrite(Sensor_LED_Pin[ch],HIGH);   // turn on illuminating LED
  set_register(0x00,0x01);                 // start sensing
  while(read_register(0x00) != 0) {
    // waiting for a result
  }

  // 10bit results
  c[ch] = read_register(REG_DATA_CLEAR_LO) | (read_register(REG_DATA_CLEAR_HI)<<8);
  r[ch] = read_register(REG_DATA_RED_LO) | (read_register(REG_DATA_RED_HI)<<8);
  g[ch] = read_register(REG_DATA_GREEN_LO) | (read_register(REG_DATA_GREEN_HI)<<8);
  b[ch] = read_register(REG_DATA_BLUE_LO) | (read_register(REG_DATA_BLUE_HI)<<8);
 if(debug) {
  Serial.print("channel ");
  Serial.print(ch, DEC);
  Serial.print(" crgb=");
  Serial.print(c[ch] ,DEC);
  Serial.print(",");
  Serial.print(r[ch] ,DEC);
  Serial.print(",");
  Serial.print(g[ch] ,DEC);
  Serial.print(",");
  Serial.println(b[ch] ,DEC);
 }
 digitalWrite(Sensor_LED_Pin[ch],LOW); // turn off illuminating LED
}

Hi,
I’ve seen code for the evaluation version of the board on this forum, but i havent seen any code for the q999 version of it, which i link to in my op.

Thats my question basically will code working on the evaluation version, work on the none evaluation version, q999?

thnx

I am not sure what difference you think there is but an ADJDS371-Q999 is an ADJDS371-Q999 irrespective of if it is on an evaluation board or not. The 999 part is just the back end of the part number.

will code working on the evaluation version, work on the none evaluation version,

there is no difference between the two so yes it would work.