claws / BH1750

An Arduino library for the digital light sensor breakout boards containing the BH1750FVI IC
MIT License
249 stars 108 forks source link

Begin test #5

Closed toyorg closed 8 years ago

toyorg commented 8 years ago

Can you help me with get this working? Especially with first line.

  if (!lightMeter.begin()) {
    lcd.print("Light failed!");
    while (1) {}
  }
claws commented 8 years ago

The begin function returns void. In your code snippet you will always fall into the if body. Perhaps you should put the error condition reporting in the else clause.

toyorg commented 8 years ago

Thanks