TCS230-DB color sensor with arduino duemilanove

I am trying to incorporate the TCS230-DB sensor with the Arduino, and don't know where to start. I looked at the basic stamp program in the manual for it, and I have no clue what it means. I have never used basic, so please don't just post a link to the manual like every other topic regarding this sensor has as an answer. If at all possible, a sample arduino code would be fantastic. Thanks.

You might want to start by looking at hot to use "pulseIn".

Ok, I have used pulsein() for the PING))) sensor. But when I say I have no clue where to start, I mean that. How does this sensor work? The pins on the DB-Expander, H, G, F, E, D, C, B, A, Vdd, and V, what are they? What do the correspond to on the actual sensor (S3, LED, S0, S2, S1, OUT, etc.)? I honestly have no clue...

I don't have one, but this seems like a fairly key sentence:

Internal to the device is an oscillator which produces a square-wave output whose frequency is proportional to the intensity of the chosen color. There is one output from this oscillator, and the color to be read is selected using two address lines:S2 and S3.

Here's an uncompiled, untested (obviously) start at translating the sample program given.

const byte S2 = 2;
const byte S3 = 3;
const byte LED = 4;
const byte RED = 5;
const byte GREEN = 6;
const byte BLUE = 7;
unsigned long red, green, blue;

void setup()
   pinMode (S2, OUTPUT);
   pinMode (S3, OUTPUT);
   pinMode (LED, OUTPUT);
   pinMode (RED, INPUT);
   pinMode (GREEN, INPUT);
   pinMode (BLUE, INPUT);
   digitalWrite (LED, HIGH);

void loop ()
  readColour ();

void readColour ()
  digitalWrite (S2, 0); 
  digitalWrite (S3, 0);
  red = pulseIn (RED, HIGH);

Awesome! Thanks! Now to find which pins on the expander correspond to S2, S3, and so on. Hopefully parallax has a wiring diagram for it. I appreciate your help.

Ok, I have it wired and it comes on, but when I’m sending a pulse and reading it with the PulseIn command, what pins am I reading? In other words, what corresponds to red, blue, and green (S1, S2, S3, etc.)?

The pinout is on the datasheet:

I'm guessing you mean this: S0 S1 Divide S2 S3 Color 0 0 0 0 Red 0 1 1:50 0 1 Blue 1 0 1:5 1 0 Clear 1 1 1:1 1 1 Green

What exactly does this mean?

You're guessing wrong. Last page of datasheet, bottom right.

i seems dun understand the pin connected.... the color sensor is used analog pin right.?

It can be used on one of the pins used for analogue input, yes, but in this case, you would set the pinMode of whichever pin you chose (A0...A5) to be INPUT, and you would use it as a digital pin.