BH1750 sensor - Nodemcu ESP8266

resolved

#1

Hi,

I have successfully set IR snd/rcv and DHT22 sensor on Nodemcu v3. I wanted to add BH1750 light sensor to the setup, so I changed DHT_RECEIVER_PIN to 14 (D5) in order to free the D1 and D2 for BH sensor.
I loaded the sketch and DHT is working good, so is IR. BH is not publishing anything.
My Nodemcu is powered by 5V over Vin, and DHT and IR are powered by 5V directly from the adapter, and my BH is powered by 3.3V from Nodemcu board.

When I start serial monitor it reads: Failed to read from LightSensor BH1750!
It doesn’t show any additional info. Do I need to change anything else? How could I troubleshoot it?


#2

Update: Replacing pins D1-SDA, D2-SCL did the trick. It works.


#3

Great thanks for the info