Sriram MN
Created March 24, 2019 © GPL3+

Heart beat badge

A badge which will glow according to your heart beat

BeginnerFull instructions provided5 hours90

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
LED (generic)
LED (generic)
×1
9V battery (generic)
9V battery (generic)
×1
pulse sensor
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

schematic

pulse sensor is represented by the ir sensor

Code

Code for blinking led with pulse

C/C++
int PulseSensorPurplePin = 0;       
int LED = 12;   


int Signal;                
int Threshold = 550;            
// The SetUp Function:
void setup() {
  pinMode(LED,OUTPUT);       
   Serial.begin(9600);         
}

// The Main Loop Function
void loop() {

  Signal = analogRead(PulseSensorPurplePin);  
                                              
   Serial.println(Signal);                    


   if(Signal > Threshold){                         
     digitalWrite(LED,HIGH);
   } else {
     digitalWrite(LED,LOW);               
   }


delay(10);


}

Credits

Sriram MN

Sriram MN

5 projects • 8 followers
A Engineering student who just stepped into the world of electronics. Interested in Astronomy,Robotics,Iot,Quantum phenomenon,Ml and AI .

Comments