We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bcb72c commit 32a479bCopy full SHA for 32a479b
Adafruit_TSL2561/Adafruit_TSL2561_example.py
@@ -1,15 +1,17 @@
1
#!/usr/bin/python
2
3
-from Adafruit_TSL2561 import Adafruit_TSL2561
+from Adafruit_TSL2561 import AdafruitTSL2561
4
5
# Initialise the sensor
6
-LightSensor = Adafruit_TSL2561.AdafruitTSL2651()
+LightSensor = AdafruitTSL2561()
7
8
# Enable auto gain switching between 1x and 16x
9
# Default is False
10
LightSensor.enable_auto_gain(True)
11
12
# Get the calculated lux value, this is a spot reading so if you're under light
13
-# lux = Adafruit_TSL2561.calculate_lux()
+lux = LightSensor.calculate_lux()
14
+
15
+print ('Lux value is %d',lux)
16
17
0 commit comments