Oximeter error message

When I run the 30105 code I downloaded from Github for the oximeter, I get the message “Example8_SPO2:144:125: error: cannot convert ‘uint16_t* {aka unsigned int*}’ to ‘uint32_t* {aka long unsigned int*}’ for argument ‘1’ to ‘void maxim_heart_rate_and_oxygen_saturation(uint32_t*, int32_t, uint32_t*, int32_t*, int8_t*, int32_t*, int8_t*)’”. It appears the variable uint16_t is defined as an unsigned integer in one place and a long unsigned integer in another. How can I fix this, or is there a better library for this device?

What board type are you compiling for? I’m not able to reproduce your error.

I was compiling to an Arduino Mega, since I got a warning that memory was low on an Uno

It seems like the board should not matter since the error message indicates that the variable was defined as an unsigned integer and the function was expecting an unsigned long integer. I could not find where the function was defined to change it to expect an unsigned integer or where the variable was defined to change it to an unsigned long.

I’m still not able to replicate the error you’re seeing when I compile that sketch on a Mega.

You might try deleting the library and [reinstalling it from Github to see if that helps.](GitHub - sparkfun/SparkFun_MAX3010x_Sensor_Library: An Arduino Library for the MAX3015 particle sensor and MAX30102 Pulse Ox sensor)

Thank you for your help. I downloaded the library you linked to and the problem disappeared. I think the library I downloaded before was different, although the code and comments appear identical. Perhaps that library had a bad file.

The program now works, sort of. It is giving me readings, but highly inaccurate ones. It seems to almost constantly read my HR as 150 ppm, although I know the correct value is about 60 ppm. It reads my SPO2 as 99 to 100, although the correct value is about 96. (I am simultaneously taking measurements with a commercial oximeter.) Any thoughts on how to get more accurate data?

You may need to play around with placement on the finger and how much pressure the finger is applying to the sensor to get the best results. I’ve noticed that these can be a bit picky with those two variables.

TS-Chris:
I’m still not able to replicate the error you’re seeing when I compile that sketch on a Mega.

You might try deleting the library and [reinstalling it from Github to see if that helps.
[/quote]

Thanks, it helps](https://www.google.com/)

Hi Chris

I have recently work on a project with MAX30102 sensor. I used ESP32 with MAX30102 sensor to get the SPO2 value. But when I verify the code in Arduino IDE it was shown error I2C… not declared on the scope. For few modifications like the changes of ESP32 pin number 21 and 22 instead of Arduino 13 and 11 and in I2C section. It was uploaded but the values are not much accurate. It hang around (100-98) only, and Heart Rate much Higher (150-166).

Now I going to change some modifications in the light intensity and frequency. At this time it was showing error on that same I2C line (line number 64)in the void setup.

I was again going to set all the values as default as previous when the code is working but the problem was still same. So will the problem is in the code or in the MAX30102 sensor? Or the problem arise from Arduino IDE?

Please help