Gallery

5V Heartbeat Sensor Detector Module By Finger

Heartbeat sensor chiosz robots 2

Heartbeat sensor chiosz robots 3

Heartbeat sensor chiosz robots 4

Heartbeat sensor chiosz robots 5

Heartbeat sensor chiosz robots

Our ChiOSZ Products

5V Heartbeat Sensor Detector Module By Finger Arduino projects robots NEW

•Module: Heartbeat Sensor
•Compatible with Arduino
•Size:1.9 x 1.5cm
Test procedure:
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,(change0.0));
oldValue=value;
oldChange=change;
delay(period);
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s