MAX30100 icon indicating copy to clipboard operation
MAX30100 copied to clipboard

Error

Open simtcrom opened this issue 3 years ago • 2 comments

I am running below,

#include "MAX30100.h" #include <Wire.h>

MAX30100* pulseOxymeter;

void setup() { Wire.begin(); Serial.begin(115200); Serial.println("Pulse oxymeter test!");

//pulseOxymeter = new MAX30100( DEFAULT_OPERATING_MODE, DEFAULT_SAMPLING_RATE, DEFAULT_LED_PULSE_WIDTH, DEFAULT_IR_LED_CURRENT, true, true ); pulseOxymeter = new MAX30100(); pinMode(2, OUTPUT);

}

void loop() { //You have to call update with frequency at least 37Hz. But the closer you call it to 100Hz the better, the filter will work. pulseoxymeter_t result = pulseOxymeter->update();

if( result.pulseDetected == true ) { Serial.println("BEAT");

Serial.print( "BPM: " );
Serial.print( result.heartBPM );
Serial.print( " | " );

Serial.print( "SaO2: " );
Serial.print( result.SaO2 );
Serial.println( "%" );

} }

getting error

C:\Users\sim_t\AppData\Local\Temp\arduino_modified_sketch_125959\Example8_SPO2.ino: In function 'void loop()': Example8_SPO2:19:3: error: 'pulseoxymeter_t' was not declared in this scope pulseoxymeter_t result = pulseOxymeter->update(); ^ Example8_SPO2:19:19: error: expected ';' before 'result' pulseoxymeter_t result = pulseOxymeter->update(); ^ Example8_SPO2:22:7: error: 'result' was not declared in this scope if( result.pulseDetected == true ) ^ Multiple libraries were found for "MAX30100.h" Used: C:\Users\sim_t\Documents\Arduino\libraries\MAX30100 Not used: C:\Users\sim_t\Documents\Arduino\libraries\MAX30100-master Not used: C:\Users\sim_t\Documents\Arduino\libraries\MAX30100lib Not used: C:\Users\sim_t\Documents\Arduino\libraries\MAX30100_milan exit status 1 'pulseoxymeter_t' was not declared in this scope

any one can help to fix?

simtcrom avatar May 01 '21 14:05 simtcrom

Hi could you fix it?

ProgrammerChii avatar Sep 12 '21 04:09 ProgrammerChii

Hello.

Quickly glancing it seems you have 3 pulseoxymeter libraries installed and they inconveniently have the same name. The linker is not able to figure out which one to use.

So either rename the libraries or delete the ones you don't use and it should work.

On Sun, 12 Sep 2021, 05:50 ProgrammerChii, @.***> wrote:

Hi could you fix it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xcoder123/MAX30100/issues/9#issuecomment-917551771, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXIUZL2HXY2EUH3SZVROCLUBQWQZANCNFSM436L7NUA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

xcoder123 avatar Sep 12 '21 10:09 xcoder123