adafruit / Adafruit_TSL2591_Library

This is an Arduino library for the TSL2591 digital luminosity (light) sensors.
58 stars 48 forks source link

Continuous enabled #30

Open s-light opened 5 years ago

s-light commented 5 years ago

let user decide if sensor should run continuously or only on interaction. (default: maintains old behavior = enable only on interaction)

so for the new 'continuously on mode' you have to enable it after the begin call:

if (tsl.begin()) {
    Serial.println(F("Found a TSL2591 sensor"));
    // if you want faster (non delaying) responses enable the sensor continuously:
    // (this needs more power..)
    tsl.enable();
}

should be fixing most things requested in #12 and all basics of #27

s-light commented 5 years ago

also should fix main part of #27

s-light commented 5 years ago

thanks Jan for the review!

i have not looked into the failing Travis CI logs - but will try to fix this tomorrow so that travis is also happy..

i have spliced the whitespace-only things into a separate (earlier) pull-request (#28) so that it is easier to see what is changed... so would make sens to merge this first if you like this idea.

i also have another pull-request in the making for some interruppt/threshold things: extended interrupt tests & small api extension (https://github.com/s-light/Adafruit_TSL2591_Library/tree/add_NPAI) - this will take one or two days until i have it done...

s-light commented 5 years ago

thanks @hoffmannjan for the travis fix.

s-light commented 4 years ago

i have cleaned the library.properties conflict.. this way currently the version is not updated..