IR Pulse Sensor Help


hello,

i bought ir pulse sensor ebay few £ , can't seem give reading representative of heartbeat.
(here link: http://www.ebay.co.uk/itm/281259154674?sspagename=strk:mewnx:it&_trksid=p3984.m1439.l2648)
this might because placing finger in wrong place? or problem code/ circuit.

here image showing circuit using, image of "keyes heartbeat sensor":


the code using is:
code: [select]
int ledpin=13;
int sensorpin=0;

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

void setup()
{
pinmode(ledpin,output);
}

void loop()
{
static double oldvalue=0;
static double oldchange=0;
int rawvalue=analogread(sensorpin);
double value=alpha*oldvalue+(1-alpha)*rawvalue;
change=value-oldvalue;

digitalwrite(ledpin,(change<0.0&&oldchange>0.0));

oldvalue=value;
oldchange=change;
delay(period);

serial.println(change);

}

thanks!

code not in code tags , there no link used hardware. please read sticky post @ top of forum.


Arduino Forum > Using Arduino > Sensors > IR Pulse Sensor Help


arduino

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support