Install s Health sensor Platform On Raspberry Pi 3 - meddeb22/e-Health-Sensor-Platform-Raspi-3 GitHub Wiki

In this tutorial I will explain how to work with e-Health Sensor Platform V2.0 .

I. INTRODUCTION :

The e-Health Sensor Shield V2.0 allows Raspberry Pi users to perform biometric and medical applications where body monitoring is needed by using 10 different sensors:

  • Pulse
  • Oxygen in blood (SPO2)
  • Airflow (breathing)
  • Body temperature
  • Electrocardiogram (ECG)
  • Glucometer
  • Galvanic skin response (GSR - sweating)
  • Blood pressure (sphygmomanometer)
  • Patient position (accelerometer)
  • Muscle/eletromyography sensor (EMG) .

II . HOW TO PLUG THE E-HEALTH SHIELD OVER THE RASPBERRY PI

III . RUNNING THE RASPBERRY PI 3 :

Before running the raspberry pi , you should make sure that bridge and raspi are on the right place .

1. update your OS by typing :

sudo apt-get update

2. upgrade it the a newest version "this command maybe take a few minutes " :

`sudo apt-get upgrade'

3. Update your raspberry frameware :

sudo raspi-update

4. Download The ArduPi Library :

wget http://www.cooking-hacks.com/media/cooking/images/documentation/raspberry_arduino_shield/raspberrypi2.zip && unzip raspberrypi2.zip && cd cooking/arduPi && chmod +x install_arduPi && ./install_arduPi && rm install_arduPi && cd ../..

5. Enable All The Interfaces :

Open the file /boot/config.txt

    sudo nano /boot/config.txt

Add the following lines to the file:

  enable_uart=1
  dtparam=spi=on
  dtparam=i2c_arm=on
  dtoverlay=pi3-miniuart-bt
  enable_uart=1
  dtparam=spi=on
  dtparam=i2c_arm=on  

Press CTRL+X to exit and save the file.

##6- Reboot

  sudo reboot

##7-Open the file /boot/cmdline.txt:

  sudo nano /boot/cmdline.txt

##8-This file may contains something like this :

  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

##9-Remove the parameters that reference the UART serial port (ttyAMA0): dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait ip=192.168.1.160:::255.255.255.0

10-shudown your raspberry

sudo shutdown - h now

##11-Plug the UART interface :

##11-Turn your raspberry pi ON and Copy all of ArduPi folder in the eHealth_raspberrypi_v2.0 :

##12-creat your program :

sudo nano prog.cpp

##13-copy/paste the code bellow :

#include "/home/pi/eHealth_raspberrypi_v2.0/eHealth.h"

void setup() { eHealth.readBloodPressureSensor(); delay(100); }

void loop() {

uint8_t numberOfData = eHealth.getBloodPressureLength(); printf("Number of measures : "); printf("%d\n",numberOfData); delay(100);

for (int i = 0; i<numberOfData; i++) { // The protocol sends data in this order printf("==========================================");

`printf("Measure number ");`
`printf("%d\n",i + 1);`

`printf("Date -> ");`
`printf("%d",eHealth.bloodPressureDataVector[i].day);`
`printf(" of ");`
`printf("%d",eHealth.numberToMonth(eHealth.bloodPressureDataVector[i].month));`
`printf(" of ");`
`printf("%d",2000 + eHealth.bloodPressureDataVector[i].year);`
`printf(" at ");`

`if (eHealth.bloodPressureDataVector[i].hour < 10) {`
  `printf("%d",0); // Only for best representation.`
`}`

`printf("%d",eHealth.bloodPressureDataVector[i].hour);`
`printf(":");`

`if (eHealth.bloodPressureDataVector[i].minutes < 10) {`
  `printf("%d",0);// Only for best representation.`
`}`
`printf("%d\n",eHealth.bloodPressureDataVector[i].minutes);`

`printf("Systolic value : ");`
`printf("%d\n",30+eHealth.bloodPressureDataVector[i].systolic);`
`printf(" mmHg\n");`

`printf("Diastolic value : ");`
`printf("%d",eHealth.bloodPressureDataVector[i].diastolic);`
`printf(" mmHg\n");`

`printf("Pulse value : ");`
`printf("%d",eHealth.bloodPressureDataVector[i].pulse);`
`printf(" bpm\n");`

}

delay(20000); }

int main (){ setup(); while(1){ loop(); } return (0); }

##12-Compile the ArduPi Code :

sudo g++ -c arduPi.cpp -o arduPi.o

##13- Compile your Own Code :

sudo g++ -lrt -lpthread prog.cpp arduPi.o -o prog

##14- Run your program :

sudo ./prog

and you get something like this

If you've got any problem , Contact me on :

[email protected]