MAX30100 and DS18B20 Monitoring System

#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Wire.h>
#include "MAX30100_PulseOximeter.h"

#define REPORTING_PERIOD_MS 1000
PulseOximeter pox;
uint32_t tsLastReport = 0;
float oxy_lvl = 0.00;

unsigned char alert = 0;
unsigned char system_alert = 0;
unsigned char alert_flag=0;

LiquidCrystal_I2C lcd(0x27,16,2);
SoftwareSerial myserial(13, 12);    // RX, TX for blood pressure sensor
SoftwareSerial esp8266(19, 18);     // rx,tx for esp8266

#define ONE_WIRE_BUS 3
#define HELP_TONE buzz, 2000, 200

const int buzz=9;

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
float cel=0.00;

String data_pressure;
char  buff[15];

String send_data_string;

const int no_of_data = 5;
String main_data[10];
int sensorValue = 0;
unsigned int tempVal = 0; 

int  sys_u = 130, dia_u = 90, temp_l = 24, temp_u = 37, pulse_l = 30, pulse_u = 120;
int sys, dia, p, stay = 1;

void onBeatDetected()
{
  Serial.println("Heart beat detected!! Oximeter pulse detected!!");
}

void setup() 
{
  pinMode(buzz, OUTPUT);
  Serial.begin(9600);
  esp8266.begin(9600);
  myserial.begin(9600);
  sensors.begin();
  sensors.setWaitForConversion(false);
  lcd.begin();
  lcd.clear();
  Serial.print("Initializing Oximeter and other sensors");
  if(!pox.begin())
  {
    Serial.println("Oximeter Failed");
    lcd.print("Oximeter Failed");
    for(;;);
  }
  else
  {
    Serial.println("Oximeter Succeeded");
  }
  pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA);
  pox.setOnBeatDetectedCallback(onBeatDetected);
  lcd.print(F("        Patient "));
  lcd.setCursor(0, 1);
  lcd.print(F(" Health  Monitor "));
  delay(2000);  
  send_data_string = String(sys) + ',' + String(dia) + ',' + String(p) + ',' + String(cel) + ',' + String(oxy_lvl);
  Serial.println("send_data_string = " + String(send_data_string)); 
  send_parameters();  
  delay(4000);  
  lcd.clear();
}

void loop()
{
  digitalWrite(buzz,LOW);
  read_temperature_and_oxi();
  main_display();
  myserial.listen();
   if (myserial.available())
   {
     while (myserial.available())
     {
       data_pressure = myserial.readString();
     }
     data_pressure.trim();
     data_pressure.toCharArray(buff, data_pressure.length() + 1);
     if (sscanf(buff, "%d,%d,%d", &sys, &dia, &p) == 3)
     {
       lcd.clear();
       lcd.print(F("sys | dia | puls"));
       lcd.setCursor(0, 1);
       lcd.print(sys);
       lcd.setCursor(7, 1);
       lcd.print(dia);
       lcd.setCursor(12, 1);
       lcd.print(p);
       delay(7500);
       read_temperature_and_oxi();
       process();
       alerting();
       delay(500);
       send_data_string = String(sys) + ',' + String(dia) + ',' + String(p) + ',' + String(cel) + ',' + String(oxy_lvl);
       Serial.println("send_data_string = " + String(send_data_string)); 
       send_parameters();
       delay(3000);      
     } 
     myserial.end();    
   }  
   myserial.listen();
   delay(1);
}

void read_temperature_and_oxi()
{
  float HeartRate = 3.0, SpO2 = 3.0;
  if(millis() - tsLastReport > REPORTING_PERIOD_MS)
  {
    pox.update();
    HeartRate = pox.getHeartRate();
    SpO2 = pox.getSpO2();
    Serial.print("Heart Rate: ");
    Serial.print(HeartRate);
    Serial.print("bpm / SpO2: ");
    Serial.print(SpO2);
    Serial.println(" % ");

    sensors.requestTemperatures();
    cel=sensors.getTempCByIndex(0);
    Serial.print("Temperatures: ");
    Serial.print(cel);
    Serial.println("");

    oxy_lvl=SpO2;
    tsLastReport=millis();
  }
}

void main_display()
{
    lcd.clear();
    lcd.print(F("Temp: "));
    lcd.setCursor(6, 0);
    lcd.print(cel);
    lcd.print((char)223);
    lcd.print('C');
    lcd.setCursor(0, 1);
    lcd.print("SpO2: ");
    lcd.setCursor(6 ,1);
    lcd.print(oxy_lvl);
    delay(200);
}

void send_parameters()
{
  esp8266.listen();
  esp8266.flush();
  esp8266.print(send_data_string);
  delay(5000);  
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print(F("  Uploaded To "));
  lcd.setCursor(0,1);
  lcd.print(F("  Firebase  "));
  delay(200);
  esp8266.end();
}

void help_display()
{
    lcd.clear();
    lcd.print(F(" PATIENT NEEDS  "));
    lcd.setCursor(6, 1);
    lcd.print(F("HELP      "));
}

void process()
{   
   if((sys > sys_u) || (dia > dia_u))
   {
       system_alert = 1; 
   }
   else if((p < pulse_l ) || (p > pulse_u))
   {
       system_alert = 2; 
   }  
   else if((cel < temp_l ) || (cel > temp_u))
   {
       system_alert = 3; 
   }
   else
   {
       system_alert = 0; 
   }
   delay(200);
}

void alerting()
{
  if(system_alert==1)
   {
    lcd.clear();
    digitalWrite(buzz,HIGH);
    lcd.setCursor(0,0);
    lcd.print("Patient BP");
    lcd.setCursor(0,1);
    lcd.print("Fluctuating");
    delay(3500);
   }
   else if(system_alert==2)
   {
    lcd.clear();
    digitalWrite(buzz,HIGH);
    lcd.setCursor(0,0);
    lcd.print("Patient Pulse");
    lcd.setCursor(0,1);
    lcd.print("Fluctuating");
    delay(3500);
   }
   else if(system_alert==3)
   {
    lcd.clear();
    digitalWrite(buzz,HIGH);
    lcd.setCursor(0,0);
    lcd.print("Temperature");
    lcd.setCursor(0,1);
    lcd.print("Fluctuating");
    delay(3500);
   }
   else
   {
    Serial.print("Continue Monitoring");
    delay(3500);
   }
}

Hi. This is for my final year project that I have been tasked with designing a patient monitoring system. However, during the last stretch of model prototyping, I am experiencing issues with my MAX30100 and DS18B20 thermal probe. My thermal probe is giving me a proper reading of the temperature. However, the oximeter values are always stuck to zero and the call back function is not executed. I did read that it was an issue where the thermal probe continues to do conversion and doesn't allow the max30100 sensor to perform any other functions. So for that, i just had to pass sensors.setWaitForConversion(false);
I did try to write the code for the DS18B20 thermal probe and the oximeter sensor seperately and it executed perfectly. However, when I try to integrate everything together into a final project, the max30100 sensor doesn't carry out the reading and is stuck to zero while the thermal probe is perfectly working finding out its temperature. I did the same coding process as the previous when i tried to seperately work with the thermal and oximeter sensor. However, it is the final integration that is causing a lot of issues.
The data will be sent to firebase realtime database via the ESP8266 Wi-Fi module. I have got it to work fine. But i am stuck on the final integration of the BP machine, the MAX30100 Oximeter sensor and the DS18B20 Waterproof Thermal Probe.
Could anyone guide me as to how do I perform integration of the MAX30100 Sensor with the DS18B20 Probe?

Attaching code for the working of the thermal probe and oximeter sensor below. It is a seperate code i wrote for testing purposes.

#include <Wire.h>
#include "MAX30100_PulseOximeter.h"
#include <LiquidCrystal_I2C.h>
#include <OneWire.h>
#include <DallasTemperature.h>

#define REPORTING_PERIOD_MS     1000
// PulseOximeter is the higher level interface to the sensor
// it offers:
//  * beat detection reporting
//  * heart rate calculation
//  * SpO2 (oxidation level) calculation
PulseOximeter pox;
uint32_t tsLastReport = 0;
LiquidCrystal_I2C lcd(0x27, 16, 2);

#define ONE_WIRE_BUS 5
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
float cel=0.00;

// Callback (registered below) fired when a pulse is detected
void onBeatDetected()
{
  Serial.println("Beat!");
}
void setup()
{
  Serial.begin(9600);
  Serial.print("Initializing...");
  sensors.begin();
  sensors.setWaitForConversion(false);
  // Initialize the PulseOximeter instance
  // Failures are generally due to an improper I2C wiring, missing power supply
  // or wrong target chip
  if (!pox.begin()) {
    Serial.println("MAX30100 was not found. Please check the wiring/power.");
    lcd.print("FAILED");
    for (;;);
  } else {
    Serial.println("SUCCESS");
  }
  // The default current for the IR LED is 50mA and it could be changed
  //   by uncommenting the following line. Check MAX30100_Registers.h for all the
  //   available options.
  // pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA);
  // Register a callback for the beat detection
  pox.setOnBeatDetectedCallback(onBeatDetected);
}
void loop()
{
  float HeartRate = 3.0, SpO2 = 3.0;
  // Make sure to call update as fast as possible
  pox.update();
  HeartRate = pox.getHeartRate();
  SpO2 = pox.getSpO2();
  // Asynchronously dump heart rate and oxidation levels to the serial
  // For both, a value of 0 means "invalid"
  if (millis() - tsLastReport > REPORTING_PERIOD_MS) {
    Serial.print("Heart rate:");
    Serial.print(HeartRate);
    Serial.print("bpm / SpO2:");
    Serial.print(SpO2);
    Serial.println("%");
    sensors.requestTemperatures();
    cel=sensors.getTempCByIndex(0);
    Serial.print("Temperature: ");
    Serial.print(cel);
    Serial.println("");
    tsLastReport = millis();

    lcd.clear();
    lcd.setCursor(0,0);
    
    lcd.print("HR:");
    lcd.print(HeartRate);
    lcd.print(" bpm");
 
    lcd.setCursor(0,1);
    
    lcd.print("SpO2:");
    lcd.print(SpO2);
    lcd.print("%");

    lcd.setCursor(11,1);
    lcd.print("T:");
    lcd.print(cel);
  }
}

Also, I am using the Arduino Mega 2560 as my Arduino Uno was crashing constantly due to low memory issues.

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project :wink: See About the Installation & Troubleshooting category.

I see a lot of problems in your code.
Two instances of SoftwareSerial won't work as you expect it.
Don't use the String class on AVR Arduinos.
The MAX30100 operates at max. 3.3V but both of your Arduinos run at 5V. We haven't seen a wiring diagram so I must assume that you connected it directly which probably fried it.

You didn't read the comments in the MAX30100 examples:

    // Make sure to call update as fast as possible
    pox.update();

In your code pox.update is called rather seldom, so it cannot work as expected.

Well, here's the prototype. Might not be able to make anything clearly. But, the thing is working. The oximeter light is lighting up and working properly.

And when I run the code written for the thermal probe as well as the oximeter on it's own, here's the output I get:

Heart Rate: 55.38 BPM / SpO2: 96.00%
Temperature: 25.50
Beat!
Heart Rate: 54.07 BPM / SpO2: 95.00%
Temperature: 26.51
Beat!
Heart Rate: 60.38 BPM / SpO2: 97.00%
Temperature: 27.55
Beat!

And here is the output I get when I try to integrate everything together:

Heart Rate: 0.00 BPM / SpO2: 0.00%
Temperature: 27.50
Heart Rate: 0.00 BPM / SpO2: 0.00%
Temperature: 27.30
Heart Rate: 0.00 BPM / SpO2: 0.00%
Temperature: 27.36
Heart Rate: 0.00 BPM / SpO2: 0.00%
Temperature: 28.05

I do need two instances of softwareserial due to the fact that I have an ESP8266 Wi-Fi Module and a Sun rom Serial Reader and BP Machine (link attached as hyperlink to the BP Machine).

Wiring is done as follows:

I2C LCD Module: GND -> GND
                VIN -> 5V
                SDA -> PIN20
                SCL -> PIN21
SCL and SDA lines are pulled using 4.7KOhm Resistors


DS18B20 Thermal Waterproof Probe: GND -> GND
                                  VIN -> 5V
                                  Data Line -> PIN3
Data Line pulled using 4.7KOhm Resistor


MAX30100 Pulse Oximeter Sensor (RCWL-0530): GND-> GND
                                            VIN -> 5V
                                            SCL -> SCL1
                                            SDA -> SDA1
                                            INT -> PIN2
SCL, SDA and INT pins pulled using 4.7KOhm Resistors


SunRom Serial Reader and BP Machine Combo: GND -> GND
                                           VIN -> 5V
                                           TX-OUT: PIN13


ESP8266-01S Wi-Fi Module: GND -> GND
                          VIN -> 3.3V
                          RX -> PIN18
                          TX -> PIN19
                          CH_EN -> 3.3V

The Pulse Oximeter (RCWL-0530) one has a painful working with microcontrollers that have a higher logic level as it pulls the SCL, SDA lines to 1.8V. This can cause issues when working with Arduino's. To solve that issue, there are 3 parallel resistors that I had to remove from the board and add my own 4.7KOhm Resistors and supply 5V to the board. Hence it worked successfully.

Yes, but it's not just a MAX30100 but some kind of breakout board containing other components. But we don't know what other components it has because you didn't provide a link to the schematics of the board.

You have a Mega2560 which has 4 hardware serial interfaces, so you don't even need one SoftwareSerial instance.

That's outside the specs of the datasheet so the sensor may fail at any time.

Did you fix the software bug I mentioned in my last post?

Here is the link from where i actually purchased the oximeter https://robu.in/product/max30100-pulse-oximeter-heart-rate-sensor-module/. It has the schematics and the wiring diagram in the description below.

Ok I'll get that corrected and re-code my program.

I am still trying to fix on how the pox.update() function can be called frequently.

The board pulls the I2C signals to 1.8V by 472Ω which results in a 3.8mA sink current, over the standard maximum of 3mA. And using a 5V microcontroller you won't see a HIGH on 1.8V.
So you need a level converter. You board doesn't contain one, you must use an external one between the two.

I'm having the same problem at the moment tried every single thing that i found on internet.
If you have solved the problem please share the solution.
Thank you in advance.

1 Like

Get the board from a serious supplier. For example Sparkfun combines the MAX30101 sensor with a MAX32664 hub chip which converts the I2C voltage to 3.3V. This is enough voltage to result in a HIGH even on a 5V system and the onboard pull-ups should keep the voltage on an acceptable level even if the internal pull-ups are activated by the Wire library. Better would be to use an additional level converter optimized for I2C to convert the voltage level to the MCU voltage.

Thank you for your answer. However, my problem is with using MAX30100 with DS18B20 at the same time.

1 Like

Does that mean, without the DS18B20 your MAX30100 works flawlessly? Post a wiring diagram of your setup!

Hi. After days and months of googling, i finally figured it out. The problem is that the max30100 sensor has a sampling rate of 100Hz and loves to just stick by it. So, i ended up adding a nodemcu to the system to isolate the oximeter and the ds18b20.
With this method, the arduino mega is handling the BP machine and the DS18B20 sensor and the nodemcu is handling the Wi-Fi connection, HTTP Post to the locally hosted MySQL DB and the oximeter sensor.
The data from the arduino is sent to the NodeMCU via serial communication.

Arduino Code:

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
#include <OneWire.h>
#include <DallasTemperature.h>

unsigned char alert = 0;
unsigned char system_alert = 0;
unsigned char alert_flag=0;

LiquidCrystal_I2C lcd(0x27,16,2);
SoftwareSerial myserial(13, 12);    // RX, TX for blood pressure sensor
SoftwareSerial esp8266(19, 18);     // rx,tx for esp8266

#define ONE_WIRE_BUS 11
#define HELP_TONE buzz, 2000, 200

const int buzz=10;

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
float cel=0.00;

String data_pressure;
char  buff[15];

String send_data_string;

const int no_of_data = 5;
String main_data[10];
int sensorValue = 0;
unsigned int tempVal = 0; 

int  sys_u = 130, dia_u = 90, temp_l = 24, temp_u = 37, pulse_l = 30, pulse_u = 120;
int sys, dia, p, stay = 1;

void setup() 
{
  pinMode(buzz, OUTPUT);
  Serial.begin(9600);
  esp8266.begin(9600);
  myserial.begin(9600);
  lcd.begin();
  lcd.clear();
  lcd.print(F(" Patient "));
  lcd.setCursor(0, 1);
  lcd.print(F(" Health  Monitor "));
  delay(2000);  
  send_data_string = String(sys) + ',' + String(dia) + ',' + String(p) + ',' + String(cel);
  Serial.println("send_data_string = " + String(send_data_string)); 
  send_parameters();  
  delay(4000);  
  lcd.clear();
}

void loop()
{
  digitalWrite(buzz,LOW);
   myserial.listen();
   if (myserial.available())
   {
     while (myserial.available())
     {
       data_pressure = myserial.readString();
     }
     data_pressure.trim();
     data_pressure.toCharArray(buff, data_pressure.length() + 1);
     if (sscanf(buff, "%d,%d,%d", &sys, &dia, &p) == 3)
     {
       lcd.clear();
       lcd.print(F("sys | dia | puls"));
       lcd.setCursor(0, 1);
       lcd.print(sys);
       lcd.setCursor(7, 1);
       lcd.print(dia);
       lcd.setCursor(12, 1);
       lcd.print(p);
       read_temperature(); 
       //process();
       //alerting();
       delay(500);
       send_data_string = String(sys) + ',' + String(dia) + ',' + String(p) + ',' + String(cel);
       Serial.println("send_data_string = " + String(send_data_string)); 
       send_parameters();
       delay(3000);      
     } 
     myserial.end();    
   }
   else
   {  
      read_temperature();
      main_display();
   }  
   myserial.listen();
   delay(1);
}

void read_temperature()
{
  Serial.print("Requesting Temperatures");
  Serial.println();
  for(int i=1;i<=5;i++)
  {
    sensors.requestTemperatures();
    cel=sensors.getTempCByIndex(0);
  }
  Serial.print("Temperature: ");
  Serial.print(cel);
  Serial.println("C");
  delay(100);
}

void main_display()
{
    lcd.clear();
    lcd.print(F(" Temp : "));
    lcd.setCursor(8, 0);
    lcd.print(cel);
    lcd.print((char)223);
    lcd.print('C');
    lcd.setCursor(0, 1);
    lcd.print(F("Kp Fing | Prs On"));
    delay(200);
}

void send_parameters()
{
  esp8266.listen();
  esp8266.flush();
  esp8266.print(send_data_string);
  delay(5000);  
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print(F("Uploaded To DB"));
  lcd.setCursor(0,1);
  lcd.print(F("OXY_LVL taken"));
  delay(4000);
  lcd.clear();
  esp8266.end();
}

void process()
{   
   if((sys > sys_u) || (dia > dia_u))
   {
       system_alert = 1; 
   }
   else if((p < pulse_l ) || (p > pulse_u))
   {
       system_alert = 2; 
   }  
   else if((cel < temp_l ) || (cel > temp_u))
   {
       system_alert = 3; 
   }
   else
   {
       system_alert = 0; 
   }
   delay(200);
}

void alerting()
{
  if(system_alert==1)
   {
    lcd.clear();
    digitalWrite(buzz,HIGH);
    lcd.setCursor(0,0);
    lcd.print("Patient BP");
    lcd.setCursor(0,1);
    lcd.print("Fluctuating");
    delay(3500);
   }
   else if(system_alert==2)
   {
    lcd.clear();
    digitalWrite(buzz,HIGH);
    lcd.setCursor(0,0);
    lcd.print("Patient Pulse");
    lcd.setCursor(0,1);
    lcd.print("Fluctuating");
    delay(3500);
   }
   else if(system_alert==3)
   {
    lcd.clear();
    digitalWrite(buzz,HIGH);
    lcd.setCursor(0,0);
    lcd.print("Temperature");
    lcd.setCursor(0,1);
    lcd.print("Fluctuating");
    delay(3500);
   }
   else
   {
    Serial.print("Continue Monitoring");
    delay(3500);
   }
}

NodeMCU Code:

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClient.h>
#include <Wire.h>
#include "MAX30100.h"
#include "MAX30100_PulseOximeter.h"

#define REPORTING_PERIOD_MS 1000

MAX30100 maxim;
PulseOximeter pox;

const char* ssid = "SDsouza";
const char* password = "dsouza@8104045917";
const char* serverName = "http://10.0.0.13/post-sensor-data.php";

String systolic_pressure;
String diastolic_pressure;
String pulse_rate;
String temperature_body;
String BPM;
String SpO2;
    
uint32_t tsLastReport = 0;

String sensor_data;
bool Sr;
String machineid = "MR1";
String room_number= "A1";
String bed_number= "1";

HTTPClient http;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(16,OUTPUT);
  WiFi.begin(ssid , password);
  Serial.print("Connecting to SSID:");
  Serial.print(ssid);
  while (WiFi.status() != WL_CONNECTED)
  {
    Serial.print(".");
    delay(500);
  }
  Serial.println();
  Serial.print("Connected Successfully!!");
  Serial.println(WiFi.localIP());
  if(!pox.begin())
  {
    Serial.print("Failed");
    for(;;);
  }
  else
  {
    Serial.println("Success");
  }
  pox.setIRLedCurrent(MAX30100_LED_CURR_50MA);
  http.begin(serverName);
}

void loop() {
  // put your main code here, to run repeatedly:
    pox.update();
    if(millis() - tsLastReport > REPORTING_PERIOD_MS)
    {
      BPM = pox.getHeartRate();
      SpO2 = pox.getSpO2();
      Serial.print("Bpm: ");
      Serial.println(BPM);
      Serial.print("SpO2: ");
      Serial.println(SpO2);
      tsLastReport = millis();
    }
    while (Serial.available())
    {
      sensor_data = Serial.readString();
      Sr = true;
    
      int firstcommaindex = sensor_data.indexOf(",");
      int secondcommaindex = sensor_data.indexOf(",", firstcommaindex + 1);
      int thirdcommaindex = sensor_data.indexOf(",", secondcommaindex + 1);
      int fourthcommaindex = sensor_data.indexOf(",", thirdcommaindex + 1);

      systolic_pressure = sensor_data.substring(0, firstcommaindex);
      diastolic_pressure = sensor_data.substring(firstcommaindex + 1, secondcommaindex);
      pulse_rate = sensor_data.substring(secondcommaindex + 1, thirdcommaindex);
      temperature_body = sensor_data.substring(thirdcommaindex + 1);

      String httpRequestData = "machine_identifier=" + machineid + "&temp=" + temperature_body + "&hr=" + pulse_rate + "&sys_pressure=" + systolic_pressure + "&dias_pressure=" + diastolic_pressure + "&oxy_lvl=" + SpO2 + "&room_number=" + room_number + "&bed_number=" + bed_number + "";
      Serial.println(httpRequestData);
      http.addHeader("Content-Type" , "application/x-www-form-urlencoded");
      Serial.print("HTTP Request Data: ");
      Serial.println(httpRequestData);
      http.POST(httpRequestData);

      maxim.resetFifo();
    }
}

You could get away with just using the arduino as well. You just have to use asynchrous function so that the DS18B20 doesn't hogg all the resources for itself. The sampling frequency of the oximeter and the thermal probe are different. So the oximeter will fail to read any values. Instead of using normal delays which halt the entire program execution use millis() and make it asynchrous delays. Also be sure to use sensors.setWaitForConversion(false) where sensors will be the variable you set for your DS18B20. This statement has to be set in the void setup() to stop the sensor from waiting for temperature conversion after it has taken the reading. This will ensure the execution of the program is handed over to the oximeter for readings.

Be sure to understand the BlinkwithNoDelay example for this. It is mostly that example just that your code will change accordingly. Or you could try using a library for the same.
GitHub - MatheusAlvesA/ArduinoAsync: A simple Arduino library that allows asynchronous function execution
AsyncTimer - Arduino Reference

You could try using these two and look at the examples for the same. If you do not wish to use any more libraries and want to keep your code clean follow this:
Blink Without Delay | Arduino

So, in short. Since you want your arduino to do two things at once, it is important to use async functions so that the next function doesn't have to wait for the previous function to get over just like traditional C programming.

1 Like

Well. that is the problem everyone are facing on the internet. The MAX30100 works flawlessly on its own. When you try to integrate it with an entire large scale project, it falls down the drain. Basically, i was guided by some of my friends to avoid this issue, go for the better version the MAX30102

1 Like

Please i want to connect MAX30100 sensor and DS18B20 sensor with arduino uno
Put i cant get value Spo2 and BP =0

Thank you very much for clarifying the situation. :slightly_smiling_face:

I have the same issue when integrating DS18B20 and MAX30100 .. but I'm using nodemcu as my main processor .. the problem is the heart rate temperature does not display any value or 0 basically .. but the temperature is working fine .. could someone help me related to this problem ?

1 Like