Skip to content

Commit b6a4f09

Browse files
committed
Added a set gain at the start of an everageing to see if it ramps up and down ok.
1 parent ca6095c commit b6a4f09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Adafruit_TSL2561/Adafruit_TSL2561.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def calculateLux(self):
484484
# Calculates an averaged Lux value over default 30 samples
485485
#**************************************************************************/
486486
def calculateAvgLux(self, testavg=int(30)):
487-
self.setGain(self.TSL2561_GAIN_16X)
487+
self.setGain(self.TSL2561_GAIN_1X)
488488
# Set initial vars
489489
count = 0
490490
luxavgtotal = 0
@@ -500,7 +500,7 @@ def calculateAvgLux(self, testavg=int(30)):
500500

501501
if __name__ == "__main__":
502502
LightSensor = Adafruit_TSL2651()
503-
# LightSensor.enableAutoGain(True)
503+
LightSensor.enableAutoGain(True)
504504

505505
# See if "loop" has been passed as an arg.
506506
try:

0 commit comments

Comments
 (0)