Infra or Red Led

What are the differences between a infra led and a super bright red led in detecting a pulse?
Who of those two are the better one?
Are those two still needing amplifiers for detecting a pulse?
Does the two of them required a specific photodiode or phototransistor?

Btw I am using a super bright red led and a photo diode in detecting a pulse.
Do I need to use a dual amplifier or only one amplifier is enough?

I’m going to feed the output of that amplifier to a arduino decimila.
Here’s the code sample:
int ledPin = 13;
int sensorPin = 0;

double alpha =0.75;
int period = 20;
double change = 0.0;

void setup()
{
pinMode(ledPin,OUTPUT);
Serial.begin(115200);
}

void loop()
{
static double oldValue = 0;
static double oldChange = 0;
int rawValue = analogRead(sensorPin);
double value = alpha * oldValue + (1-alpha)*rawValue;

digitalWrite(ledPin,(change<0.0 && oldChange >0.0));

Serial.println(value);

oldValue= value;
oldChange =change;
delay(period);
}

I have only a week to finish my project… Time is running out… =(
Please help…
Thanks in advance…

PLease use code tags when posting code == # button

a quick look reveals that change is never assigned a value,

double value = alpha * oldValue + (1-alpha)*rawValue;

can be written as

double value = oldValue - beta * (oldValue - rawValue); // beta = 1-alpha;

takes less math and only has one "beta" iso two "alpha" in the formula.

your turn