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

Committer:
raheel123
Date:
Fri Feb 09 08:34:23 2018 +0000
Revision:
0:0e26bf847b57
Tapton school SENtinel project

Who changed what in which revision?

UserRevisionLine numberNew contents of line
raheel123 0:0e26bf847b57 1
raheel123 0:0e26bf847b57 2 /*!
raheel123 0:0e26bf847b57 3 * @file DFRobot_Heartrate.h
raheel123 0:0e26bf847b57 4 * @brief Heartrate.h detailed description for Heartrate.cpp
raheel123 0:0e26bf847b57 5 *
raheel123 0:0e26bf847b57 6 * This is written for the heart rate sensor the company library. Mainly used for real
raheel123 0:0e26bf847b57 7 * time measurement of blood oxygen saturation, based on measured values calculate heart rate values.
raheel123 0:0e26bf847b57 8 *
raheel123 0:0e26bf847b57 9 * @author linfeng(Musk.lin@dfrobot.com)
raheel123 0:0e26bf847b57 10 * @version V1.0
raheel123 0:0e26bf847b57 11 * @date 2015-12-24
raheel123 0:0e26bf847b57 12 */
raheel123 0:0e26bf847b57 13
raheel123 0:0e26bf847b57 14 #ifndef __DFRobot_HEARTRATE__H
raheel123 0:0e26bf847b57 15 #define __DFRobot_HEARTRATE__H
raheel123 0:0e26bf847b57 16
raheel123 0:0e26bf847b57 17
raheel123 0:0e26bf847b57 18 //#include "Arduino.h"
raheel123 0:0e26bf847b57 19 #include "Clock.h"
raheel123 0:0e26bf847b57 20 #include "mbed.h"
raheel123 0:0e26bf847b57 21 #define ANALOG_MODE 0
raheel123 0:0e26bf847b57 22 #define DIGITAL_MODE 1
raheel123 0:0e26bf847b57 23
raheel123 0:0e26bf847b57 24 #include "SMARTGPU2.h"
raheel123 0:0e26bf847b57 25
raheel123 0:0e26bf847b57 26 #define SAMPLE_NUMBER 300
raheel123 0:0e26bf847b57 27
raheel123 0:0e26bf847b57 28
raheel123 0:0e26bf847b57 29 class DFRobot_Heartrate
raheel123 0:0e26bf847b57 30 {
raheel123 0:0e26bf847b57 31 public:
raheel123 0:0e26bf847b57 32 DFRobot_Heartrate(char mode) { mode_ = mode; }
raheel123 0:0e26bf847b57 33 char maxNumber(unsigned int count);
raheel123 0:0e26bf847b57 34 void minNumber(unsigned int count);
raheel123 0:0e26bf847b57 35 unsigned int analogGetRate(void);
raheel123 0:0e26bf847b57 36 unsigned int digitalGetRate(void);
raheel123 0:0e26bf847b57 37 unsigned int getRate(void);
raheel123 0:0e26bf847b57 38 unsigned int getCnt(void);
raheel123 0:0e26bf847b57 39 unsigned int getValue(unsigned int pin);
raheel123 0:0e26bf847b57 40
raheel123 0:0e26bf847b57 41
raheel123 0:0e26bf847b57 42 private:
raheel123 0:0e26bf847b57 43
raheel123 0:0e26bf847b57 44 unsigned int mode_;
raheel123 0:0e26bf847b57 45 unsigned int valueCount_;
raheel123 0:0e26bf847b57 46 unsigned int valueFlag;
raheel123 0:0e26bf847b57 47 unsigned int nowTim,lastTim;
raheel123 0:0e26bf847b57 48
raheel123 0:0e26bf847b57 49 };
raheel123 0:0e26bf847b57 50
raheel123 0:0e26bf847b57 51 #endif
raheel123 0:0e26bf847b57 52
raheel123 0:0e26bf847b57 53 /******************************************************************************
raheel123 0:0e26bf847b57 54 Copyright (C) <2015> <linfeng>
raheel123 0:0e26bf847b57 55 This program is free software: you can redistribute it and/or modify
raheel123 0:0e26bf847b57 56 it under the terms of the GNU General Public License as published by
raheel123 0:0e26bf847b57 57 the Free Software Foundation, either version 3 of the License, or
raheel123 0:0e26bf847b57 58 (at your option) any later version.
raheel123 0:0e26bf847b57 59 This program is distributed in the hope that it will be useful,
raheel123 0:0e26bf847b57 60 but WITHOUT ANY WARRANTY; without even the implied warranty of
raheel123 0:0e26bf847b57 61 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
raheel123 0:0e26bf847b57 62 GNU General Public License for more details.
raheel123 0:0e26bf847b57 63 You should have received a copy of the GNU General Public License
raheel123 0:0e26bf847b57 64 along with this program. If not, see <http://www.gnu.org/licenses/>.
raheel123 0:0e26bf847b57 65 Contact: Musk.lin@dfrobot.com
raheel123 0:0e26bf847b57 66 ******************************************************************************/
raheel123 0:0e26bf847b57 67
raheel123 0:0e26bf847b57 68