Heartbeat Detection Sensor Module

Description:

  • Working voltage: 5V
  • Use IR LED and optical transistor to detect pulsation in fingers
  • Used for synthesized teaching experiment
  • Dimensions: 25 x 22 x 17mm
  • Weight: 2g

Kit include:

  • 1 x Sensor module

Mikroelectron Code:

For Arduino Test Code

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);
}

5 JD
Quantity
3 in stock
5 JD 1+ units
4.75 JD 10+ units
4.5 JD 25+ units
4.25 JD 100+ units



Related Products

subscribe to our weekly newsletter

loading