This page is to Setup and Config Keyes Heartbeat
Hardware and Software
Hardware
Keyes Heartbeat
Software
Arduino IDE
Sanki Notes
- Keyes Heartbeat; unplug and plug again when pload by Arduino IDE (For Reset)
Examples
This example is Work and Fine
-
/* This example will show you how to use the KY-039 heart bear sensor. Its a simple basic heart beat monitor with a LCD1602A. In this example i did not use a I2C for those who dont have it. */
double alpha=0.75; int period=20; double refresh=0.0; void setup(void) { Serial.begin(9600); pinMode(A0,INPUT);
}
void loop(void) { static double oldValue=0; static double oldrefresh=0; int beat=analogRead(A0); double value=alpha*oldValue+(0-alpha)*beat; refresh=value-oldValue;
Serial.print(" Heart Monitor "); Serial.print(" "); Serial.println(beat/10); oldValue=value; oldrefresh=refresh; delay(period*10);
}
|