0

I am new to Arduino. I am trying to use Pulsioximeter sensor with e-health Platform (http://www.cooking-hacks.com/documentation/tutorials/ehealth-biometric-sensor-platform-arduino-raspberry-pi-medical) on Arduino Uno. Line number 13 is working fine in the example code given in the library and works just fine. But when I try to upload my custom code (setup function definition is given below), I get an error stating 'readPulsioximeter' not defined in this scope. The error doesn't seem obvious to me. Please guide.

Here is the custom code upto setup() function:

#include < eHealth.h >
#include < PinChangeInt.h >
bool configuration = false;
//bool in_it=true;
byte val; // variable to receive data from the serial port
int ledpin = 13; // LED connected to pin 48 (on-board LED)
int A=1;
void setup() {
 pinMode(ledpin, OUTPUT); 
 Serial.begin(115200);
 eHealth.initPulsioximeter();
 //Attach the interruptions for using the pulsioximeter.
 PCintPort::attachInterrupt(6, readPulsioximeter, RISING);
 delay(500);
}

EDIT1: readPulsioximeter is declared in eHealth.h library which has been included in program. The function has been defined as below in eHealth.cpp file:

 //!******************************************************************************
 //! Name: readPulsioximeter() *
 //! Description: It reads a value from pulsioximeter sensor. *
 //! Param : void *
 //! Returns: void *
 //! Example: readPulsioximeter(); *
 //!******************************************************************************
 void eHealthClass::readPulsioximeter(void)
 {
 uint8_t digito[] = {0,0,0,0,0,0};
 uint8_t A = 0;
 uint8_t B = 0;
 uint8_t C = 0;
 uint8_t D = 0;
 uint8_t E = 0;
 uint8_t F = 0;
 uint8_t G = 0;
 for (int i = 0; i<6 ; i++) { // read all the led's of the module
 A = !digitalRead(13);
 B = !digitalRead(12);
 C = !digitalRead(11);
 D = !digitalRead(10);
 E = !digitalRead(9);
 F = !digitalRead(8);
 G = !digitalRead(7);
 digito[i] = segToNumber(A, B, C ,D ,E, F,G); 
 delayMicroseconds(2800); //2800 microseconds
 }
 SPO2 = 10 * digito[5] + digito[4];
 BPM = 100 * digito[2] + 10 * digito[1] + digito[0];
 }
jfpoilpret
9,1627 gold badges38 silver badges54 bronze badges
asked Oct 27, 2014 at 17:10

2 Answers 2

1

The problem is that you have no function called "readPulsioximeter" in your code. Either define it, pick a different function, or remove that line of code.

answered Oct 27, 2014 at 17:24
2
  • readPulsioximeter is declared in eHealth.h library which has been included in program. Please see <b>EDIT1</b> in the the question. Commented Oct 28, 2014 at 7:52
  • :) Thanks for your help. I re-defined the function in the program and it worked. Commented Oct 28, 2014 at 8:24
1

It looks like your missed naming the eHealth object, and that that statement should read:

PCintPort::attachInterrupt(6, eHealth.readPulsioximeter, RISING);

as you did with the initPulsioximeter call. (In otherwords, "which pulsioximeter?").

answered Oct 27, 2014 at 22:19
2
  • When I try specifying eHealth.readPulsioximeter, it is shown as unresolved overloaded function type. Problem is that the same line is working in another program but gives error in this program. Commented Oct 28, 2014 at 7:58
  • :) Thanks for your help. I re-defined the function in the program and it worked. Commented Oct 28, 2014 at 8:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.