Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions adafruit_tcs34725.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,11 @@ def _temperature_and_lux_dn40(self):
# Lux Calculation (DN40 3.2)
G1 = R_Coef * R2 + G_Coef * G2 + B_Coef * B2
CPL = (ATIME_ms * AGAINx) / (GA * DF)
CPL = 0.001 if CPL == 0 else CPL
lux = G1 / CPL

# CT Calculations (DN40 3.4)
R2 = 0.001 if R2 == 0 else R2
CT = CT_Coef * B2 / R2 + CT_Offset

return lux, CT
Expand Down