I'm trying to read a light sensor (Adafruit BH1750) with a MKR ZERO board.
At this point the code is very straight forward and just willing to init the sensor.
I notice that sensor.begin() never returns a Boolean value and get stuck there.
#include <hp_BH1750.h>
hp_BH1750 sensor;
void setup()
{
Serial.begin(9600);
while (!Serial) {;}
Serial.println("Start");
bool avail = sensor.begin(BH1750_TO_GROUND); // set addr = 0x23 with Pin ADDR to ground
Serial.println(avail);
//sensor.start();
Serial.println("End");
}
void loop()
{
}
the pull-up would do a difference for sure if you don't have any on your Arduino, not sure if 3K3 would be much different than 4K7.
do you have a Uno or another Arduino to check if the sensor does work fine ?