SparkFun_MAX3010x_Sensor_Library
SparkFun_MAX3010x_Sensor_Library copied to clipboard
I2C_BUFFER_LENGTH value differs with Wire.h
trafficstars
In case if ESP32, for example, the I2C_BUFFER_LENGTH is 128, and in that case you set it to 32 in this line:
https://github.com/sparkfun/SparkFun_MAX3010x_Sensor_Library/blob/d625b7e31c06d5c6a27395a46a32e6ba927b5c0b/src/MAX30105.h#L42
Maybe you should consider, instead of #else ==>"#define I2C_BUFFER_LENGTH 32" doing something like #else #ifndef I2C_BUFFER_LENGTH #define I2C_BUFFER_LENGTH 32 #endif #endif
so in the example of ESP32, where I2C_BUFFER_LENGTH is alreade defined to 128, will not interfere