Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Monitoring heart rate, or "batimentos cardíacos," is a common application in health and fitness projects. Arduino, with its versatility and ease of use, can be employed to create a simple heart rate monitor using a pulse sensor. This project is an excellent way to explore bio-sensing technology and understand how heart rate monitoring works.
Examples:
To create a heart rate monitor using Arduino, you will need the following components:
Step-by-Step Instructions:
Connect the Pulse Sensor:
Install the Pulse Sensor Library:
Write the Arduino Sketch:
Here is a sample code to read the heart rate data from the pulse sensor and output it to the Serial Monitor:
#include <PulseSensorPlayground.h>
const int PulseWire = 0; // Pulse Sensor connected to Analog Pin 0
const int LED13 = 13; // The on-board Arduino LED
int Threshold = 550; // Adjust this value to your needs
PulseSensorPlayground pulseSensor;
void setup() {
Serial.begin(9600);
pulseSensor.analogInput(PulseWire);
pulseSensor.blinkOnPulse(LED13);
pulseSensor.setThreshold(Threshold);
if (pulseSensor.begin()) {
Serial.println("Pulse Sensor initialized successfully.");
}
}
void loop() {
int myBPM = pulseSensor.getBeatsPerMinute();
if (pulseSensor.sawStartOfBeat()) {
Serial.print("BPM: ");
Serial.println(myBPM);
}
delay(20);
}
Upload the Code:
Monitor the Heart Rate:
This simple setup allows you to monitor heart rate using an Arduino and a pulse sensor. The project can be expanded by adding a display to show the BPM or incorporating wireless communication to send data to a smartphone or computer.