Skip to content

Commit 08d14cb

Browse files
committed
Sphinx updates.
1 parent f402f3a commit 08d14cb

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

README.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ Installing from PyPI
3232
--------------------
3333
.. note:: This library is not available on PyPI yet. Install documentation is included
3434
as a standard element. Stay tuned for PyPI availability!
35-
.. todo:: Remove the above note if PyPI version is/will be available at time of release.
36-
If the library is not planned for PyPI, remove the entire 'Installing from PyPI' section.
35+
3736
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
3837
PyPI <https://pypi.org/project/adafruit-circuitpython-veml7700/>`_. To install for current user:
3938

@@ -59,7 +58,20 @@ To install in a virtual environment in your current project:
5958
Usage Example
6059
=============
6160

62-
.. todo:: Add a quick, simple example. It and other examples should live in the examples folder and be included in docs/examples.rst.
61+
.. code-block:: python
62+
63+
import time
64+
import board
65+
import busio
66+
import adafruit_veml7700
67+
68+
i2c = busio.I2C(board.SCL, board.SDA)
69+
veml7700 = adafruit_veml7700.VEML7700(i2c)
70+
71+
while True:
72+
print("Ambient light:", veml7700.light)
73+
time.sleep(0.1)
74+
6375
6476
Contributing
6577
============

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
# Uncomment the below if you use native CircuitPython modules such as
2121
# digitalio, micropython and busio. List the modules you use. Without it, the
2222
# autodoc module docs will fail to generate with a warning.
23-
# autodoc_mock_imports = ["digitalio", "busio"]
23+
autodoc_mock_imports = ["adafruit_register.i2c_struct", "adafruit_register.i2c_bits",
24+
"adafruit_register.i2c_bit"]
2425

2526

2627
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'BusDevice': ('https://circuitpython.readthedocs.io/projects/busdevice/en/latest/', None),'Register': ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}

0 commit comments

Comments
 (0)