File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -6,3 +6,21 @@ Ensure your device works with this simple test.
6
6
.. literalinclude :: ../examples/vcnl4200_simpletest.py
7
7
:caption: examples/vcnl4200_simpletest.py
8
8
:linenos:
9
+
10
+ Full test
11
+ ----------
12
+
13
+ Try out all of the options for the VCNL4200.
14
+
15
+ .. literalinclude :: ../examples/vcnl4200_fulltest.py
16
+ :caption: examples/vcnl4200_fulltest.py
17
+ :linenos:
18
+
19
+ Interrupts test
20
+ ----------------
21
+
22
+ Test out high and low threshold interrupts for the proximity and lux sensors.
23
+
24
+ .. literalinclude :: ../examples/vcnl4200_interrupts.py
25
+ :caption: examples/vcnl4200_interrupts.py
26
+ :linenos:
Original file line number Diff line number Diff line change 10
10
11
11
i2c = board .I2C ()
12
12
13
- # Initialize VCNL4200
14
13
sensor = adafruit_vcnl4200 .Adafruit_VCNL4200 (i2c )
15
- print ( "started" )
14
+
16
15
while True :
17
16
print (f"Proximity is: { sensor .proximity } " )
18
17
print (f"Ambient is: { sensor .lux } " )
You can’t perform that action at this time.
0 commit comments