Integrating the MAXREFDES117 with the micro:bit (C++)

Hello,
Has anyone used the MAXREFDES117 from maxim integrated with the micro:bit before? It’s a pulse oximeter sensor from rs online which has example source code available for both arduino and mbed platforms (micro:bit is an mbed platform).

The MAXREFDES117 has 3 C++ files and 3 header files: algorithm.cpp, MAX30102.cpp, and main.cpp. I don’t have code specifically for the micro:bit, but only a select number of boards. The code from the manufacturer (link to code) is specifically designed for mbed platforms: • Maxim Integrated MAX32600MBED# • Freescale FRDM-K64F • Freescale FRDM-KL25Z. However, as micro:bit is an mbed platform as well (same version number), and the sensor should be able to be powered by the micro:bit’s 3V pin voltage, I tried using the micro:bit, but the code doesn’t work with it.

The errors that the mbed (online) compiler shows include (I can’t see the next error until I fix the last) the following:

  • As provided (unchanged code from above link), the compiler states: “Error: Identifier “I2C_SDA” is undefined in “MAX30102/MAX30102.cpp”, Line: 65, Col: 10”. According to link, using a different board to what is suggested needs only a change in the I2C pin assignments. However, I am not sure where in the code I would update the pins. I have tried to avoid the error stated by the compiler by swapping out 'I2C i2c(I2C_SDA, I2C_SCL);' with 'MicroBitI2C i2c = MicroBitI2C(I2C_SDA0, I2C_SCL0);', but I am not sure whether this is correct. If I do this swap, the compiler then considers the error solved and shows up with the next one:

  • As provided and the swap from the last error implemented, the compiler states: “Error: Identifier “INT” is undefined in “main.cpp”, Line: 139, Col: 16”. The code uses the INT pin which isn’t a specific pin on the microbit, so I’m not sure what that would connect to. Upon searching for how I would use an interrupt pin on a micro:bit, I found that it is possible to set a pin as the interrupt pin using (from link): func (p Pin) SetInterrupt(change PinChange, callback func(Pin)) error
    However, I am not sure how I would implement this into the micro:bit, or how it works.

Apologies for my lack of understanding in C++, but please could you assist me in interacting the micro:bit with the MAXREFDES117. Thank you very much