Instructions

IDUINO for maker’s life
www.openplatform.cc 55
void setup ()
{
pinMode (Led, OUTPUT) ; / / define LED as output interface
pinMode (buttonpin, INPUT) ; / / output interface as defined Reed sensor
}
void loop ()
SunFounder{
val = digitalRead (buttonpin) ; / / digital interface will be assigned a
value of 3 to read val
if (val == HIGH) / / When the Reed sensor detects a signal, LED flashes
{
digitalWrite (Led, HIGH);
}
else
{
digitalWrite (Led, LOW);
}
}
********Code End********
Module 19 Heartbeat Sensor
1 Introduction
This project uses bright infrared (IR) LED and a phototransistor to detect the pulse of the