tcs3200 with attiny85

i need a program to read the color sensor value ..

i tried some program i vil give the program below:
code:
void setup()
{
pinMode (0,INPUT) ;
mySerial.begin(9600);

}

void loop() // run over and over
{
int a=pulseIn(0,HIGH);
mySerial.write(a);
delay(200);
}

i need a correction or some other program ..
how can i use interrupt in this program ???

The sketch is missing code tags! Please read the sticky post at the top of the topic.

The sketch is not complete, it won't compile. Please post only complete sketches.

Post a wiring diagram of your setup. If you don't use the sensor directly but by some breakout board, post a link to the schematics of this board. Depending on the wiring this sketch (if completed) might work.

Start here for everything you need to know about interrupts.

the code compiles. can give me a code ..

will this code work on :
#include<SoftwareSerial.h>
#define counter_delay 20

int maxi = 0, mini = 5000;
int k = 0, i = 0;
volatile int pulse_count;
volatile int req_pulse;
int pin = 3; //INTERRUPT
int pin_irq = 1; //IRQ that matches to pin 2 INT 1
char Sensor;
SoftwareSerial mani(3,4);

void setup() {
mani.begin (9600);
pinMode(0,INPUT_PULLUP);
}

void loop() {
req_pulse = pulseIn(0,HIGH);
mani.write(req_pulse);
delay(500);
}

Still no code tags.

Also no interrupt service routine to actually do something with those interrupts.

Why do you need an interrupt here?

What does the sketch write to the serial interface? Post the output!

And post the wiring diagram.

The comments in the sketch are wrong. Please fix them.

how it works means. color sensor will print the value continuously. if any disturbance occurs it should not print the value . it should print some text ..

pin connection:

vcc and gnd to tiny

output of color sensor to the 5th physical pin of tiny.
tx of tiny (3rd physical pin) given to uno rx.
rx of tiny (2nd physica pin) given to uno tx.

this the connection.. after uploading the program to attiny85.

software serial program will be uploaded to uno. to watchh the value on serial monitor