27
27
examples/simpletest.py for a demo of the usage.
28
28
29
29
* Author(s): Tony DiCola
30
+
31
+ Implementation Notes
32
+ --------------------
33
+
34
+ **Hardware:**
35
+
36
+ * Adafruit `TSL2591 High Dynamic Range Digital Light Sensor
37
+ <https://www.adafruit.com/product/1980>`_ (Product ID: 1980)
38
+
39
+ **Software and Dependencies:**
40
+
41
+ * Adafruit CircuitPython firmware for the ESP8622 and M0-based boards:
42
+ https://github.com/adafruit/circuitpython/releases
43
+ * Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
30
44
"""
31
45
from micropython import const
32
46
@@ -149,10 +163,10 @@ def disable(self):
149
163
def gain (self ):
150
164
"""Get and set the gain of the sensor. Can be a value of:
151
165
152
- - `GAIN_LOW` (1x)
153
- - `GAIN_MED` (25x)
154
- - `GAIN_HIGH` (428x)
155
- - `GAIN_MAX` (9876x)
166
+ - `` GAIN_LOW` ` (1x)
167
+ - `` GAIN_MED` ` (25x)
168
+ - `` GAIN_HIGH` ` (428x)
169
+ - `` GAIN_MAX` ` (9876x)
156
170
"""
157
171
control = self ._read_u8 (_TSL2591_REGISTER_CONTROL )
158
172
return control & 0b00110000
@@ -172,12 +186,12 @@ def gain(self, val):
172
186
def integration_time (self ):
173
187
"""Get and set the integration time of the sensor. Can be a value of:
174
188
175
- - `INTEGRATIONTIME_100MS` (100 millis)
176
- - `INTEGRATIONTIME_200MS` (200 millis)
177
- - `INTEGRATIONTIME_300MS` (300 millis)
178
- - `INTEGRATIONTIME_400MS` (400 millis)
179
- - `INTEGRATIONTIME_500MS` (500 millis)
180
- - `INTEGRATIONTIME_600MS` (600 millis)
189
+ - `` INTEGRATIONTIME_100MS` ` (100 millis)
190
+ - `` INTEGRATIONTIME_200MS` ` (200 millis)
191
+ - `` INTEGRATIONTIME_300MS` ` (300 millis)
192
+ - `` INTEGRATIONTIME_400MS` ` (400 millis)
193
+ - `` INTEGRATIONTIME_500MS` ` (500 millis)
194
+ - `` INTEGRATIONTIME_600MS` ` (600 millis)
181
195
"""
182
196
control = self ._read_u8 (_TSL2591_REGISTER_CONTROL )
183
197
return control & 0b00000111
0 commit comments