BH1750 readLightLevel doesn't change

I'm using a light intensity sensor BH1750 in a small weather station.

The code here: code

My problem is that the sensor reads an initial value, but does not change when the light intensity increases or dims. Any idea for me?

Thank you

Which library for the BH1750 do you use ?

It's this: https://github.com/claws/BH1750

To say something useful, I have to know a lot more.
Which Arduino board do you use ?
How do you connect the 3.3V sensors ?
Can you give links to both the BMP180 and BH1750 modules that you have ? Do they have a voltage regulator on the board ?

What happens when you run the i2c_scanner sketch ?
http://playground.arduino.cc/Main/I2cScanner

That BH1750 library has an example.
Could you remove all the other sensors and run that example sketch.

The library might work, but it uses the Wire library in a wrong way.
I found four different BH1750 libraries, and they are all copied from each other, and they all use the Wire library wrong.

This is a better readLightLevel() function:

uint16_t BH1750::readLightLevel(void) {

  uint16_t level;

  Wire.requestFrom(BH1750_I2CADDR, 2);
  level = Wire.read();
  level <<= 8;
  level |= Wire.read();

#if BH1750_DEBUG == 1
  Serial.print("Raw light level: ");
  Serial.println(level);
#endif

  // level is an unsigned integer.
  // divide it by 1.2 to convert to lux
  // That is the same as substract 1/6 of it, which can be done with integers.
  level -= level/6;    // convert to lux

#if BH1750_DEBUG == 1
  Serial.print("Light level: ");
  Serial.println(level);
#endif

  return level;
}

Yes, I'm going to try. I don't speak English, this is difficult for me.

The module is a BH1750fvi gy-30. I don't know more about it.

The board is an Arduino Uno R3.

The wiring I used was: GND --> Ground ADD --> Ground SDA --> A4 SCL --> A5 VCC --> 3.3V

The I2C bus is shared wiht a BMP180 gy-68 module. GND --> Ground VIN --> 3.3V SCL --> A5 SDA --> A4

I tried wiring only the BH1750 with the library example, as you said, and it works fine.

Both have a voltage regulator, you better power them with 5V. VCC --> 5V VIN --> 5V

The I2C scanner outputs:

Scanning... I2C device found at address 0x23 ! I2C device found at address 0x77 ! done

I am confused, data sheets set Vcc = 3.3V. But there are projects on the Internet with 3.3V and 5V configurations ...

However, connect the module to 5V not seem to solve the problem.

I think I solved it. I didn’t put delay in a loop function.

Can you post the working code for future reference?

use this lib: https://github.com/Erriez/ErriezBH1750 its very good