Skip to content

Commit f402f3a

Browse files
committed
Added register info.
1 parent 4ab3a33 commit f402f3a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

adafruit_veml7700.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class VEML7700:
9292
ALS_800MS: 800
9393
}
9494

95+
# ALS - Ambient light sensor high resolution output data
9596
light = ROUnaryStruct(0x04, "<H")
9697
"""Ambient light data.
9798
@@ -111,6 +112,8 @@ class VEML7700:
111112
print("Ambient light:", veml7700.light)
112113
time.sleep(0.1)
113114
"""
115+
116+
# WHITE - White channel output data
114117
white = ROUnaryStruct(0x05, "<H")
115118
"""White light data.
116119
@@ -130,12 +133,14 @@ class VEML7700:
130133
print("White light:", veml7700.white)
131134
time.sleep(0.1)
132135
"""
136+
137+
# ALS_CONF_0 - ALS gain, integration time, interrupt and shutdown.
133138
light_shutdown = RWBit(0x00, 0, register_width=2)
134139
"""Ambient light sensor shutdown. When ``True``, ambient light sensor is disabled."""
135140
light_interrupt = RWBit(0x00, 1, register_width=2)
136141
"""Enable interrupt. ``True`` to enable, ``False`` to disable."""
137142
light_gain = RWBits(2, 0x00, 11, register_width=2)
138-
"""Ambient light gain setting. Gain settings are 2, 1, 1/4 and 1/8. Can be:
143+
"""Ambient light gain setting. Gain settings are 2, 1, 1/4 and 1/8. Settings options are:
139144
ALS_GAIN_2, ALS_GAIN_1, ALS_GAIN_1_4, ALS_GAIN_1_8.
140145
141146
This example sets the ambient light gain to 2 and prints the ambient light sensor data.
@@ -182,10 +187,13 @@ class VEML7700:
182187
183188
"""
184189

190+
# ALS_WH - ALS high threshold window setting
185191
light_high_threshold = UnaryStruct(0x01, "<H")
186192
"""Ambient light sensor interrupt high threshold setting."""
193+
# ALS_WL - ALS low threshold window setting
187194
light_low_threshold = UnaryStruct(0x02, "<H")
188195
"""Ambient light sensor interrupt low threshold setting."""
196+
# ALS_INT - ALS INT trigger event
189197
light_interrupt_high = ROBit(0x06, 14, register_width=2)
190198
"""Ambient light high threshold interrupt flag. Triggered when high threshold exceeded."""
191199
light_interrupt_low = ROBit(0x06, 15, register_width=2)

0 commit comments

Comments
 (0)