Tapton School Project to monitor and log SEN students physiological condition using GSR (conductivity) & Heart Rate and displaying output and logging the data to an SD card

Dependencies:   SMARTGPU2 mbed

DFRobot_Heartrate.h

Committer:
raheel123
Date:
2018-02-09
Revision:
0:0e26bf847b57

File content as of revision 0:0e26bf847b57:


/*!
* @file DFRobot_Heartrate.h
* @brief Heartrate.h detailed description for Heartrate.cpp 
*
*  This is written for the heart rate sensor the company library. Mainly used for real 
*  time measurement of blood oxygen saturation, based on measured values calculate heart rate values.
* 
* @author linfeng(Musk.lin@dfrobot.com)
* @version  V1.0
* @date  2015-12-24
*/

#ifndef __DFRobot_HEARTRATE__H
#define __DFRobot_HEARTRATE__H
          

//#include "Arduino.h"
#include "Clock.h"
#include "mbed.h"
#define ANALOG_MODE 0
#define DIGITAL_MODE 1

#include "SMARTGPU2.h"

#define SAMPLE_NUMBER 300


class DFRobot_Heartrate
{
public:
    DFRobot_Heartrate(char mode) { mode_ = mode; }
    char maxNumber(unsigned int count);
    void minNumber(unsigned int count);
    unsigned int analogGetRate(void);
    unsigned int digitalGetRate(void);
    unsigned int getRate(void);
    unsigned int getCnt(void); 
    unsigned int getValue(unsigned int pin); 
   
    
private:    
    
    unsigned int mode_;  
    unsigned int valueCount_;
    unsigned int valueFlag;  
    unsigned int nowTim,lastTim;
    
};

#endif

/******************************************************************************
  Copyright (C) <2015>  <linfeng>
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  Contact: Musk.lin@dfrobot.com
 ******************************************************************************/