Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Tomzzia opened this issue Jan 1, 2023 · 1 comment
Open

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

Tomzzia opened this issue Jan 1, 2023 · 1 comment

Comments

@Tomzzia
Copy link

Tomzzia commented Jan 1, 2023

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();
}

}

@mediocre9
Copy link

is their any solution to this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants