Skip to content

My GY-MAX30100 pulse oximeter issue with Arduino Uno.  #88

Description

@Tomzzia

Arduino hardware: 1.18.19
OXIMETER ARDUINO UNO
VIN 5V
GND GND
SCL SCL
SDA SDA

But in the Serial Monitor is "Initializing pulse oximeter..." and GY-MAX30100 isn't work

322830086_932133411277641_1652493572594300088_n

My code:

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

#define REPORTING_PERIOD_MS 1000

PulseOximeter pox;
uint32_t tsLastReport = 0;

void onBeatDetected()
{
Serial.println("Beat!");
}

void setup()

{
Serial.begin(115200);
Serial.print("Initializing pulse oximeter..");

if (!pox.begin()) {
    Serial.println("FAILED");
    for(;;);
} else {
    Serial.println("SUCCESS");
}
 pox.setIRLedCurrent(MAX30100_LED_CURR_7_6MA);


pox.setOnBeatDetectedCallback(onBeatDetected);

}

void loop()
{

pox.update();
if (millis() - tsLastReport > REPORTING_PERIOD_MS) {
    Serial.print("Heart rate:");
    Serial.print(pox.getHeartRate());
    Serial.print("bpm / SpO2:");
    Serial.print(pox.getSpO2());
    Serial.println("%");

    tsLastReport = millis();
}

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions