Monday, 19 September 2016

Lesson 8: Activity 1(Testing Heart Rate Sensor)

Lesson 8
Activity 1 - Testing Heart Rate Sensor

Materials Needed:

  • Arduino Board
  • Breadboard
  • USB Cable
  • Laptop
  • Heart Rate ear-clip sensor
  • 5 x Jumper Wires

Codes:


const int heartPin = ?;                         
                     
void setup()
{
  Serial.begin(9600);                    
  pinMode(heartPin, ?);                 
}

void loop()
{
  if(digitalRead(heartPin)>0)
    {              
    Serial.println("Reading");              
    }
else
    {
     Serial.println("0");                 
    }
}

No comments:

Post a Comment