Displaying values from libraries into serial moniter

Hello all,

I am currently playing around with the cooking hacks SPO2 sensor and want to further this by sending my readings to a database, the code to get the sensor working and for the values to be displayed on the sensors LED display is:

/*  
 *  eHealth sensor platform for Arduino and Raspberry from Cooking-hacks.
 *  
 *  Copyright (C) Libelium Comunicaciones Distribuidas S.L. 
 *  http://www.libelium.com 
 *  
 *  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. 
 *  a
 *  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/. 
 *  
 *  Version:           2.0
 *  Design:            David Gascón 
 *  Implementation:    Luis Martin & Ahmad Saad
 */

//Include eHealth library
#include <eHealth.h>
#include <eHealthDisplay.h>

int cont = 0;

void readPulsioximeter();

void setup() {

	eHealth.initPulsioximeter();
	//Attach the inttruptions for using the pulsioximeter.
	attachInterrupt(6, readPulsioximeter, RISING);
}


void loop() {

  printf("PRbpm : %d",eHealth.getBPM());

  printf("    %%SPo2 : %d\n", eHealth.getOxygenSaturation());

  printf("=============================");
  

  digitalWrite(2,HIGH);

  delay(500);

}

void readPulsioximeter(){

  cont ++;
  if (cont == 500) { //Get only of one 50 measures to reduce the latency
    eHealth.readPulsioximeter();
    cont = 0;
  }
}

  

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

Looking inside the eHealth library I have found the value is saved as:

\return int : The oxygen saturation value. Normal values betwen 95-99%  
		*/	int getOxygenSaturation(void);

I want to have the SPO2 readings appear on the serial monitor, in a crude attempt I added a new function MonitorPrint to my code:

void readPulsioximeter();
void MonitorPrint();

void setup() {

	eHealth.initPulsioximeter();
	//Attach the inttruptions for using the pulsioximeter.
	attachInterrupt(6, readPulsioximeter, RISING);
}

void MonitorPrint(){
  
  Serial.println(eHealth.getOxygenSaturation());
}

I believed that the readings visible on the LED display would appear onto the serial monitor however although it compiles the serial monitor is as empty as before.
I am using IDE 1.0.6 and V2.4 of the eHealth library, available on the cooking hacks website

https://www.cooking-hacks.com/documentation/tutorials/ehealth-biometric-sensor-platform-arduino-raspberry-pi-medical/

Any guidance would be appreciated, thank you.

Why have you written your own main() function ?
The one built behind the scenes when you compile from the IDE does more than yours so you might as well use it.

Thank you, was not aware of this, the main() function has been removed

You need to have Serial.begin(baud rate) in set up, and the baud rate in the sketch and serial monitor must be the same.

Looking inside the eHealth library I have found the value is saved as:

That is a function that returns a value. That value is NOT saved anywhere by the library. It is YOUR sketch that needs to save the value returned by the function.

Where is ALL of your code? Just writing a function, without calling it, is useless.