Cannot retrieve data from MAX30100 using I2C with Arduino Yun

Hello all,

I am trying to establish communication via I2C with a GY-MAX30100 as a slave and an Arduino Yun as the master.
Buuut no library I’ve tried seemed to work, so as a first step I now try to do something simple: Reading the part ID of the GY-MAX30100 from a specific register:

#include <Wire.h>
#define DEVICE_ADR      0x57    //Device address
#define PARTID_REG      0xFF    //Register address of part ID, taken from datasheet (p. 10)
#define PARTID_VAL      0x11    //Part ID value, taken from datasheet (p. 10)

void setup() {
  delay(100);
  Serial.begin(115200);
  while(!Serial);
  Serial.println("Start connection test");

  //Try to get Part ID
  uint8_t partID;
  
  Wire.begin();                         //Begin wire connection
  Wire.beginTransmission(DEVICE_ADR);   //Beginn I2C transmission to slave
  Wire.write((uint8_t)PARTID_REG);      //Queue bytes for transmission
  Wire.endTransmission(false);          //Transmit queued bytes but do not release connection (restart)
  Wire.requestFrom(DEVICE_ADR, 1);      //Request 1 byte from device
  partID = Wire.read();                 //Reads transmitted bytes

  //Print results
  Serial.print("Read $"); Serial.print(PARTID_REG, HEX); Serial.print(": 0x"); Serial.println(partID, HEX);
  if(partID == PARTID_VAL) {
    Serial.println("Correct part ID retrieved");
  } else {
    Serial.println("Incorrect part ID retrieved");
  }
  
  while(1);
}

void loop() {
  
}

From the datasheet of the MAX30100 I know the location and value of the “part ID” (not quite sure what that is), however I always receive a wrong value (0x15 instead of 0x11).

I am clueless how to debug this any further. As this is the first time for me using I2C I am not sure where to look next and would be very grateful for any suggestions!

My wiring is attached (sorry for the horrible diagram). The GY-MAX30100 has internal 10K pull-up resistors for the SCL and SDA lines.

What I have tried so far for this specific problem

  • Deactivating internal pull-ups for YUN’s SCL and SDA pin
  • Adding additional external pull-ups (10k) to SCL and SDA lines
  • Using Rob Tillaart’s bus scanner to confirm that a device with the device address (0x57) is present

I'm missing a link to the schematics of your GY-MAX30100 board. The ones I found have a voltage of 3.3V for VIN in their specs. If you connected that to 5V you may have fried the board but that depends on the used components.