مخطط الرسم البياني :
تحميل كود أردوينو هنا :
// Project : Arduino HeartbeatRate Sensor With LED
// By : DIY Channel / ABDELLATIF MIMOUNE
// My Youtube Channel : https://www.youtube.com/c/DIYChannel2019
int PulseSensorPurplePin = 0;
int LED_3 = 3;
int Signal;
int Threshold = 550;
//-------------------By:abdellatif mimoune-----------------------------------
void setup()
{
pinMode(LED_3,OUTPUT); //--> Set LED_3 PIN as Output.
Serial.begin(9600); //--> Set's up Serial Communication at certain speed.
}
//------------------------DIY CHANNEL---------------------------------------------
void loop()
{
Signal = analogRead(PulseSensorPurplePin);
Serial.println(Signal);
if(Signal > Threshold){
digitalWrite(LED_3,HIGH);
} else {
digitalWrite(LED_3,LOW);
}
delay(10);
}
//--------------------------YOUTUBE : DIY CHANNEL ---------------------------------
No comments:
Post a Comment