19. hartslagsensor


 
Heartbeatsensor Easy Pulse v1.1
 
leverancier: www.bitsandparts.eu
 
 
zonder Arduino, rechtstreeks:
deel 1: http://embedded-lab.com/blog/easy-pulse-version-1-1-sensor-overview-part-1/
deel 2: http://embedded-lab.com/blog/easy-pulse-version-1-1-sensor-overview-part-2/
 
met Arduino:  
http://embedded-lab.com/blog/pc-based-heart-rate-monitor-using-arduino-and-easy-pulse-sensor/
 
 
overzicht aansluiting Arduino:
 
   aansluitschema
 

 
 
 
 
Code:
/* AnalogReadSerial Reads an analog input on pin 0, prints the result to the serial monitor   This example code is in the public domain. */void setup() { Serial.begin(115200);} void loop() { int sensorValue = analogRead(A0); Serial.println(sensorValue); delay_x(5);} void delay_x(uint32_t millis_delay){ uint16_t micros_now = (uint16_t)micros();  while (millis_delay > 0) { if (((uint16_t)micros() - micros_now) >= 1000) { millis_delay--; micros_now += 1000; } } } - See more at: http://embedded-lab.com/blog/pc-based-heart-rate-monitor-using-arduino-and-easy-pulse-sensor/#sthash.hWjVbuCg.dpuf
/* AnalogReadSerial Reads an analog input on pin 0, prints the result to the serial monitor   This example code is in the public domain. */void setup() { Serial.begin(115200);} void loop() { int sensorValue = analogRead(A0); Serial.println(sensorValue); delay_x(5);} void delay_x(uint32_t millis_delay){ uint16_t micros_now = (uint16_t)micros();  while (millis_delay > 0) { if (((uint16_t)micros() - micros_now) >= 1000) { millis_delay--; micros_now += 1000; } } } - See more at: http://embedded-lab.com/blog/pc-based-heart-rate-monitor-using-arduino-and-easy-pulse-sensor/#sthash.hWjVbuCg.dpuf
/* AnalogReadSerial Reads an analog input on pin 0, prints the result to the serial monitor   This example code is in the public domain. */void setup() { Serial.begin(115200);} void loop() { int sensorValue = analogRead(A0); Serial.println(sensorValue); delay_x(5);} void delay_x(uint32_t millis_delay){ uint16_t micros_now = (uint16_t)micros();  while (millis_delay > 0) { if (((uint16_t)micros() - micros_now) >= 1000) { millis_delay--; micros_now += 1000; } } } - See more at: http://embedded-lab.com/blog/pc-based-heart-rate-monitor-using-arduino-and-easy-pulse-sensor/#sthash.hWjVbuCg.dpuf
/*
  AnalogReadSerial
 Reads an analog input on pin 0, prints the result to the serial monitor
 
 This example code is in the public domain.
 */

void setup() {
  Serial.begin(115200);
}

void loop() {
  int sensorValue = analogRead(A0);
  Serial.println(sensorValue);
  delay_x(5);
}

void delay_x(uint32_t millis_delay)
{
  uint16_t micros_now = (uint16_t)micros();

  while (millis_delay > 0) {
    if (((uint16_t)micros() - micros_now) >= 1000) {
      millis_delay--;
      micros_now += 1000;
    }
  }  
}
 
Uitgangssignalen analoog en digitaal: