27
27
micropython-adafruit-tcs34725 module by Radomir Dopieralski:
28
28
https://github.com/adafruit/micropython-adafruit-tcs34725
29
29
30
- See examples/simpletest .py for an example of the usage.
30
+ See examples/tcs34725_simpletest .py for an example of the usage.
31
31
32
32
* Author(s): Tony DiCola
33
+
34
+ Implementation Notes
35
+ --------------------
36
+
37
+ **Hardware:**
38
+
39
+ * Adafruit `RGB Color Sensor with IR filter and White LED - TCS34725
40
+ <https://www.adafruit.com/product/1334>`_ (Product ID: 1334)
41
+
42
+ * Flora `Color Sensor with White Illumination LED - TCS34725
43
+ <https://www.adafruit.com/product/1356>`_ (Product ID: 1356)
44
+
45
+ **Software and Dependencies:**
46
+
47
+ * Adafruit CircuitPython firmware for the ESP8622 and M0-based boards:
48
+ https://github.com/adafruit/circuitpython/releases
49
+ * Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
33
50
"""
34
51
import time
35
52
@@ -127,7 +144,7 @@ def _write_u16(self, address, val):
127
144
128
145
@property
129
146
def active (self ):
130
- """Get and set the active state of the sensor. Boolean value that will
147
+ """The active state of the sensor. Boolean value that will
131
148
enable/activate the sensor with a value of True and disable with a
132
149
value of False.
133
150
"""
@@ -150,7 +167,7 @@ def active(self, val):
150
167
151
168
@property
152
169
def integration_time (self ):
153
- """Get and set the integration time of the sensor in milliseconds."""
170
+ """The integration time of the sensor in milliseconds."""
154
171
return self ._integration_time
155
172
156
173
@integration_time .setter
@@ -162,7 +179,7 @@ def integration_time(self, val):
162
179
163
180
@property
164
181
def gain (self ):
165
- """Get and set the gain of the sensor. Should be a value of 1, 4, 16,
182
+ """The gain of the sensor. Should be a value of 1, 4, 16,
166
183
or 60.
167
184
"""
168
185
return _GAINS [self ._read_u8 (_REGISTER_CONTROL )]
@@ -174,7 +191,7 @@ def gain(self, val):
174
191
175
192
@property
176
193
def interrupt (self ):
177
- """Get and clear the interrupt of the sensor. Returns a bool that's
194
+ """Return and clear the interrupt of the sensor. Returns a bool that's
178
195
True if the interrupt is set. Can be set to False (and only False)
179
196
to clear the interrupt.
180
197
"""
@@ -235,7 +252,7 @@ def lux(self):
235
252
236
253
@property
237
254
def cycles (self ):
238
- """Get and set the persistence cycles of the sensor."""
255
+ """The persistence cycles of the sensor."""
239
256
if self ._read_u8 (_REGISTER_ENABLE ) & _ENABLE_AIEN :
240
257
return _CYCLES [self ._read_u8 (_REGISTER_APERS ) & 0x0f ]
241
258
return - 1
@@ -252,7 +269,7 @@ def cycles(self, val):
252
269
253
270
@property
254
271
def min_value (self ):
255
- """Get and set the minimum threshold value (AILT register) of the
272
+ """The minimum threshold value (AILT register) of the
256
273
sensor as a 16-bit unsigned value.
257
274
"""
258
275
return self ._read_u16 (_REGISTER_AILT )
@@ -263,7 +280,7 @@ def min_value(self, val):
263
280
264
281
@property
265
282
def max_value (self ):
266
- """Get and set the minimum threshold value (AIHT register) of the
283
+ """The minimum threshold value (AIHT register) of the
267
284
sensor as a 16-bit unsigned value.
268
285
"""
269
286
return self ._read_u16 (_REGISTER_AIHT )
0 commit comments