Skip to content

Instantly share code, notes, and snippets.

@labsguru
Created August 23, 2022 06:15
Show Gist options
  • Select an option

  • Save labsguru/894c4073f8c3535841139a32ff7270d1 to your computer and use it in GitHub Desktop.

Select an option

Save labsguru/894c4073f8c3535841139a32ff7270d1 to your computer and use it in GitHub Desktop.
void setup() {
pinMode(A0, INPUT);
Serial.begin(9600);
} //https://kitsguru.com/products/ky-039-finger-detection-heartbeat-measuring-sensor-module
void loop() {
float pulse;
int sum = 0;
for (int i = 0; i < 20; i++)
sum += analogRead(A0);
pulse = sum / 20.00;
Serial.println(pulse);
delay(100);
} //CREDITS : https://electropeak.com/learn/interfacing-ky-039-finger-heartbeat-measuring-sensor-module-with-arduino/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment