Skip to content

Commit 31531d1

Browse files
committed
add all examples to docs
1 parent 1b26498 commit 31531d1

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

docs/examples.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,21 @@ Ensure your device works with this simple test.
66
.. literalinclude:: ../examples/vcnl4200_simpletest.py
77
:caption: examples/vcnl4200_simpletest.py
88
: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:

examples/vcnl4200_simpletest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010

1111
i2c = board.I2C()
1212

13-
# Initialize VCNL4200
1413
sensor = adafruit_vcnl4200.Adafruit_VCNL4200(i2c)
15-
print("started")
14+
1615
while True:
1716
print(f"Proximity is: {sensor.proximity}")
1817
print(f"Ambient is: {sensor.lux}")

0 commit comments

Comments
 (0)