How to change sample rate in MAX30105.h

Hi, i have some issues trying to improve the sample rate of the adquisition of temperature with 3 sensors MAX30101 from Sparkfun, using the library MAX30105.h.

Previously, the sampling rate with just LED acquisition was ~144 Hz, but when adding temperature acquisition, the sampling rate drops to ~9.8 Hz. I tried modifying the library, specifically in the readTemperature() section of MAX30105.cpp, but was unsuccessful. I'd like to know if it's possible to increase the sampling rate to at least 30 Hz.

Can someone help me?

Welcome to the forum

Please post your full sketch, using code tags when you do

Posting your code using code tags prevents parts of it being interpreted as HTML coding and makes it easier to copy for examination

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

I haven't used these sensors, but according to the datasheet, the theoretical maximum frequency is below 35 Hz. By the way, it seems strange to me that you would need such a high frequency for temperature measurement, after all, substances have quite a high temperature inertia.

Did you look at the Example9_RateTesting.ino example that comes with the library? It shows you how to push the chip as fast as possible.