Skip to content

Commit 9a14a71

Browse files
authored
adding Clear and NIR accessors
1 parent 44a07d7 commit 9a14a71

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

adafruit_as7341.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,18 @@ def channel_680nm(self):
375375
"""The current reading for the 680nm band"""
376376
self._configure_f5_f8()
377377
return self._channel_3_data
378+
379+
@property
380+
def channel_clear(self):
381+
"""The current reading for the clear sensor"""
382+
self._configure_f5_f8()
383+
return self._channel_4_data
378384

379-
# TODO: Add clear and NIR accessors
385+
@property
386+
def channel_clear(self):
387+
"""The current reading for the NIR (near-IR) sensor"""
388+
self._configure_f5_f8()
389+
return self._channel_5_data
380390

381391
def _wait_for_data(self, timeout=1.0):
382392
"""Wait for sensor data to be ready"""

0 commit comments

Comments
 (0)