RPM sketches

Hello everyone
I am currently writing a sketch that can read RPM from two different sources simentaneously and display it on 16×2 lcd. Please help about how to do it.
The code is

int val,val1;
long last=0;
int stat=LOW;
int stat2;
int contar=0;

int sens=75; // this value indicates the limit reading between dark and light,
// it has to be tested as it may change acording on the
// distance the leds are placed.
int nPalas=2; // the number of blades of the propeller

int milisegundos=500; // the time it takes each reading
void setup()
{
Serial.begin(9600);
pinMode(13,OUTPUT);
}

void loop()
{
val=analogRead(0);

if(val<sens)
stat=LOW;
else
stat=HIGH;
digitalWrite(13,stat); //as iR light is invisible for us, the led on pin 13
//indicate the state of the circuit.

if(stat2!=stat){ //counts when the state change, thats from (dark to light) or
//from (light to dark), remmember that IR light is invisible for us.
contar++;
stat2=stat;
}
if(millis()-last>=milisegundos){
double rps=((double)contar/nPalas)/2.01000.0/milisegundos;
double rpm=((double)contar/nPalas)/2.0
60000.0/(milisegundos);
Serial.print((contar/2.0));Serial.print(" RPS “);Serial.print(rps);
Serial.print(” RPM");Serial.print(rpm);Serial.print(" VAL ");Serial.println(val);
contar=0;
last=millis();
}
rpm2();
}
void rpm2()
{
val1=analogRead(1);

if(val1<sens)
stat=LOW;
else
stat=HIGH;

if(stat2!=stat){ //counts when the state change, thats from (dark to light) or
//from (light to dark), remmember that IR light is invisible for us.
contar++;
stat2=stat;
}
if(millis()-last>=milisegundos){
double rps2=((double)contar/nPalas)/2.01000.0/milisegundos;
double rpm2=((double)contar/nPalas)/2.0
60000.0/(milisegundos);
Serial.print((contar/2.0));Serial.print(" RPS 1");Serial.print(rps2);
Serial.print(" RPM 1");Serial.print(rpm2);Serial.print(" VAL ");Serial.println(val);
contar=0;
last=millis();
}
}

Can you be more specific about what problems you are having? Can you post your code with a description of what it is supposed to do and what it actually does? Can you post a schematic?

Please read the "how to use the forum" stickies. They will give you information about what we need in order to help you and information on how to format and post your code.

I am currently writing a sketch that can read RPM from two different sources simentaneously

No, you are not. The Arduino can NOT do two things simultaneously.

Please help about how to do it

Do what?

The first thing you should look at is reading the sensors via interrupts…http://playground.arduino.cc/Main/ReadingRPM

In your case you would need to set up two interrupts routines on different pins for the two reading that you are looking for.