Open marius240 opened 5 years ago
You may need to pull up the SDA and SCL before Wire.begin(SDA, SCL); pinMode(SDA, INPUT_PULLUP); pinMode(SCL, INPUT_PULLUP);
And make sure the BH1750 is...physically connected. My board is ESP32 and works fine.
I hit the same error when my sensor looses the pin contact.
my code:
The cabling:
D21 -> SDA D22 -> SCL GND & ADDR -> gnd VCC -> 3.3V