BH1750 and MLX90614 do not work together on I2C, why?

I only have BH1750, MLX90614 on I2C and both do not work on the same line. When I tested the MLX90614 separately, everything worked fine. After connecting the bH1750, everything worked for a few minutes and then I started getting crap over the serial line.

While the sun is shining, the lux from the BH1750 should measure over 30,000 lux and the MLX90614 should throw -40 in clear skies.

Will you help me how to make it work? My code is below:

#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include <BH1750FVI.h>

Adafruit_MLX90614 mlx = Adafruit_MLX90614();

BH1750FVI LightSensor(BH1750FVI::k_DevModeContLowRes);
uint16_t lux;

void setup() {

void loop() {
    byte value =;
     if(value == '1')
      lux = LightSensor.GetLightIntensity();


Which Arduino board do you use ?
Which MLX90614 do you use ? The 3V version or the 5V version ?
The BH1750 is only for 3.3V. Can you give a link to where you bought the module ?
Do you use pullup resistors for the I2C bus and what is their value and are they pullups to 5V or to 3.3V ?

This is the MLX90614 library that you use: GitHub - adafruit/Adafruit-MLX90614-Library: Arduino library for the MLX90614 sensors in the Adafruit shop. The function readObjectTempC() returns a 'double'.
Which BH1750FVI library do you use ?

When there is a problem with printing the "|", then use a comma. Also print a new line.
Why wait for the serial input ? You can make a test-sketch with this:

void loop()
  lux = LightSensor.GetLightIntensity();
  Serial.print(", ");
  double temperature = mlx.readObjectTempC();
  Serial.print( temperature);
  delay( 500);

Both sensors should not be pointed towards the sun.