Simulatenous readings from MAX30105 and Ambient Light Sensor (VEML6030) into single Arduino UNO?

Hi guys,

For my thesis I have been using the MAX30105 and VEML6030 for sensor validation purposes.

I am now at a stage where I would like to interface both these sensors for simulateneous readings.

However, I am unsure about two things:

  1. With other sensors you generally interface the analog read code off an analog pin such as A0-A5. How does this work with the I^2C capability of these sensors. To connect these two sensors all I had to do was connect SCL, SDA, Power and ground. How can I change the default code provided for these sensors to incoporate them both at once?

  2. Touched on above, how must i tweak the code to read multiple sensors at once? Is this possible? I tried to combine the two codes and recieved a buffered response of an initialising message and that was it.

I believe this is because the MAX30105 tempoerature sensor uses 9600baud and the VEML6030 utilises 115200 baud.

I have attached the code below.

Any help would be much appreciated!

Code.pdf (15.2 KB)

I am aware that I2C ports can read from the same SDA and SCL pins I just need to define the two sensors as different adresses but am struggling to do this with the supplied code SparkFun has provided.

Regards,

nikmoo