Problems with MAX30100 and MLX90614, using ESP8266

#include <Wire.h>
#include "MAX30100_PulseOximeter.h"
#include <Adafruit_MLX90614.h>


#define REPORTING_PERIOD_MS 1000


uint32_t tsLastReport, tempLastReport;

Adafruit_MLX90614 mlx = Adafruit_MLX90614();
PulseOximeter pox;

void setup() {
  Serial.begin(2000000);
  Wire.begin();
  
  
  mlx.begin();
  pox.begin();
  Wire.setClock(400000);
}

void loop() 
{
  printTemp();
  printFreq();
}

void printTemp()
{
  if (millis() - tempLastReport > REPORTING_PERIOD_MS) 
  {
    Serial.print("Temperatura=> "); 
    Serial.print(mlx.readObjectTempC()); 
    Serial.println(" C");
    tempLastReport = millis();
  }
}

void printFreq(){
  pox.update();

  if (millis() - tsLastReport > REPORTING_PERIOD_MS)
 {
    Serial.print("Ritmo Cardiaco=> ");
    Serial.print(pox.getHeartRate());
    Serial.print("bpm / SpO2=> ");
    Serial.print(pox.getSpO2());
    Serial.println("%");
    printTemp();
    tsLastReport = millis();
  }
}

I have problems connecting the two sensors and it does not give me the data of MXL90614, I need help and know my problem

Welcome to the forum

Your topic was MOVED to its current forum category as it is more suitable than the original

What made you think that it had anything to do with Covid ?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.