mardiyah nurhayati
Published © CC BY

heartbeat monitor dengan nodemcu + pulsesensor

heartbeat monitor adalah penghitung denyut jantung manusia dengan satuan BPM(Beats per Minute)..

EasyWork in progress512
heartbeat monitor dengan nodemcu + pulsesensor

Things used in this project

Hardware components

NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
×1
pulse sensor
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

velcro (perekat)
lem tembak

Story

Read more

Schematics

Breadboard

Untitled sketch bb kwgngvxbez

Schematic

Untitled sketch schem 3fqwcvqkvv

Code

Heartbeat grafik

Arduino
/*
  AnalogReadSerial
  Reads an analog input on pin 0, prints the result to the serial monitor.
  Graphical representation is available using serial plotter (Tools > Serial Plotter menu)
  Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.

  This example code is in the public domain.
*/

// the setup routine runs once when you press reset:
int d=0;
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
  if(sensorValue>900){
    d=d+1;
    Serial.println(sensorValue);
  
  }
  
        // delay in between reads for stability
}

Menghitung detak jantung

Arduino
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
#include <Ticker.h>

Ticker flipper;
int d=0;
void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  flipper.attach(60,Sendata);
}
void Sendata(){
  Serial.println(d);
  d=0;
}
void loop() {
  // read the input on analog pin 0:
  int sensorValue=analogRead(A0);
  // print out the value you read:

    if(sensorValue>800){
      d=d+1;
      while(sensorValue>800){
        sensorValue = analogRead(A0);
      }
    } 
  delay(1);        // delay in between reads for stability
}

Credits

mardiyah nurhayati

mardiyah nurhayati

1 project • 0 followers

Comments

Add projectSign up / Login