Getting BPM To Monitor
Getting BPM To Monitor
Getting BPM To Monitor
// Variables
const int PulseWire = A0; // PulseSensor PURPLE WIRE connected to ANALOG PIN
0
const int LED13 = A2; // The on-board Arduino LED, close to PIN 13.
int Threshold = 510; // Determine which Signal to "count as a beat" and
which to ignore.
// Use the "Gettting Started Project" to fine-tune
Threshold Value beyond default setting.
// Otherwise leave the default "550" value.
void setup() {
// Double-check the "pulseSensor" object was created and "began" seeing a signal.
if (pulseSensor.begin()) {
Serial.println("We created a pulseSensor Object !"); //This prints one time at
Arduino power-up, or on Arduino reset.
}
}
void loop() {