#include <Wire.h>
#include "MAX30105.h"
#include "heartRate.h"
MAX30105 ps;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Wire.begin();
if (!ps.begin(Wire, I2C_SPEED_FAST)) //Use default I2C port, 400kHz speed
{
Serial.println("MAX30102 was not found. Please check wiring/power. ");
while (1)
;
}
ps.setup(); //Configure sensor with default settings
ps.setPulseAmplitudeRed(0x0A); //Turn Red LED to low to indicate sensor is running
ps.setPulseAmplitudeGreen(0); //Turn off Green LED //Configure sensor with default settings
}
void loop() {
// Serial.printf("getIR [Outside While] : %d \n", ps.getIR());
Serial.printf("FIFO_IR : %d \n", ps.getFIFOIR());
// put your main code here, to run repeatedly:
// Wire.beginTransmission(0x57);
// Wire.write(0x07);
// Wire.endTransmission(true);
// Wire.requestFrom(0x57, 4);
// uint8_t val = Wire.read();
// Serial.println(val);
delay(1000);
}