Blood Pressure Coding


I am doing blood pressure monitor for my project and i tried to use the example provided, but the serial monitor did not come out the result shown but it turn out to be as the photo below. I am not sure what is the problem. NEED HELP!

Thank You :slight_smile:

 *  eHealth sensor platform for Arduino and Raspberry from Cooking-hacks.
 *  Description: "The e-Health Sensor Shield allows Arduino and Raspberry Pi 
 *  users to perform biometric and medical applications by using 9 different 
 *  sensors: Pulse and Oxygen in Blood Sensor (SPO2), Airflow Sensor (Breathing),
 *  Body Temperature, Electrocardiogram Sensor (ECG), Glucometer, Galvanic Skin
 *  Response Sensor (GSR - Sweating), Blood Pressure (Sphygmomanometer) and 
 *  Patient Position (Accelerometer)." 
 *  In this example we are going to get data stored in the blood pressure sensor 
 *  memory and show the result in the serial monitor.   
 *  Copyright (C) 2012 Libelium Comunicaciones Distribuidas S.L.
 *  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
 *  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 <> .
 *  Version 2.0
 *  Author: Ahmad Saad  & Luis Martin

#include <eHealth.h>

void setup() { 


void loop() { 

  uint8_t numberOfData = eHealth.getBloodPressureLength();   
  Serial.print(F("Number of measures : "));    
  Serial.println(numberOfData, DEC);   

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

    Serial.print(F("Measure number "));
    Serial.println(i + 1);

    Serial.print(F("Date -> ")); 
    Serial.print(F(" of ")); 
    Serial.print(F(" of "));
    Serial.print(2000 + eHealth.bloodPressureDataVector[i].year);    
    Serial.print(F(" at "));

    if (eHealth.bloodPressureDataVector[i].hour < 10) {
      Serial.print(0); // Only for best representation.


    if (eHealth.bloodPressureDataVector[i].minutes < 10) {
      Serial.print(0);// Only for best representation.

    Serial.print(F("Systolic value : ")); 
    Serial.println(F(" mmHg"));
    Serial.print(F("Diastolic value : ")); 
    Serial.println(F(" mmHg"));
    Serial.print(F("Pulse value : ")); 
    Serial.println(F(" bpm"));


Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

What data rate is your serial terminal set to, as your sketch uses 115200

I use 115200 as my data rate but the outcome only came out to be as shown.


I looked in the eHealth.cpp library file. The readBloodPressureSensor() method is setting the serial monitor speed to 19200 and writing what seem to be control codes to it.


If you change serial monitor speed to 19200 and remove your Serial.begin(), you will see characters appearing for these three bytes. Are they supposed to be going to an attached device?



This is my program code. And after i changed i still get the same result.

and i tried to use the example provided,

What example provided with what? It does NOT appear that the code is expecting to talk to the Serial Monitor. It appears, instead, as though the code is expecting to talk to something like a Processing app that will draw pictures based on the data it receives.

This might help, in fact the cook-hacks site looks as though it will answer some of your questions.

Tom..... :slight_smile: