Member Since: June 11, 2012
Country: United States
Tutorial - AD8232 Heart Rate Monitor Hookup Guide about 7 years ago
I got an excellent stroke, doing an average of every 13 beats. This softens the stroke. Here is the code: void loop () { int average= 0; int reading; if ((digitalRead (10) == 1) || (digitalRead (11) == 1)) { Serial.println ('!'); } else { // send the value of analog input 0: for (int i = 0; i <13; i ++) { reading + = analogRead (A0); delay (1); } average= reading / 13; Serial.println (average); } // Wait for a bit to keep serial data from saturating
}
No public wish lists :(