Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
Engr Muhammad Sheraz
Published © LGPL

Covid-19 Heart Monitoring System using Arduino

The Heart monitoring system is the most common management system to detect heart attacks and expected heart failure, before the ECG

IntermediateFull instructions provided10 hours489
Covid-19 Heart Monitoring System using Arduino

Things used in this project

Hardware components

Seeed Studio Arduino Uno
×1
SparkFun Pluse sensor For Heart Monitoring
×1
Microsoft OLED module
×1
Adafruit Jumper Wires
×1
9V battery (generic)
9V battery (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

DFRobot Solidering Iron with Digital Meter

Story

Read more

Custom parts and enclosures

Library for OLED

Schematics

Circuit Diagram

Code

Code

C/C++
#include <Wire.h>
 
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
 
Adafruit_SSD1306 srituhobby = Adafruit_SSD1306(128, 64, &Wire);
 
#define sensor A0
 
#define Highpulse 540
 
int sX = 0;
int sY = 60;
 
int x = 0;
int Svalue;
 
int value;
long Stime = 0;
 
long Ltime = 0;
int count = 0;
 
int Bpm = 0;
 
void setup() {
Serial.begin(9600);
 
srituhobby.begin(SSD1306_SWITCHCAPVCC, 0x3C);// Address 0x3C for 128x32 delay(1000);
srituhobby.clearDisplay();
}
 
void loop() {
 
Svalue = analogRead(sensor);
Serial.println(Svalue);
 
value = map(Svalue, 0, 1024, 0, 45);
 
int y = 60 - value;
 
if (x > 128) {
x = 0;
 
sX = 0;
srituhobby.clearDisplay();
 
}
 
srituhobby.drawLine(sX, sY, x, y, WHITE); sX = x;
sY = y;
x  ++;
 
BPM();
 
srituhobby.setCursor(0, 0);
 
srituhobby.setTextSize(2);
srituhobby.setTextColor(SSD1306_WHITE);
 
srituhobby.print("BPM :");
srituhobby.display();
 
}
 
void BPM() {
 
if (Svalue > Highpulse) {
 
Stime = millis() - Ltime;
 
count++;
 
if (Stime / 1000 >= 60) {
Ltime = millis();
 
Serial.println(count);
srituhobby.setCursor(60, 0);
 
srituhobby.setTextSize(2);
srituhobby.setTextColor(SSD1306_WHITE);
 
srituhobby.print(count);
srituhobby.print("    	");
 
srituhobby.display();
count = 0;
 
}
}
 
}
 

Credits

Engr Muhammad Sheraz
14 projects • 64 followers
BSc Electerical Enginer and An Expert Academic Writer https://aquabcasing.com/WhatsApp: +923057608848

Comments