Skip to content

Commit 7dcf767

Browse files
committed
readme
1 parent 1f0321f commit 7dcf767

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.rst

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,10 @@ or individual libraries can be installed using
3939
`circup <https://github.com/adafruit/circup>`_.
4040

4141

42-
43-
.. todo:: Describe the Adafruit product this library works with. For PCBs, you can also add the
44-
image from the assets folder in the PCB's GitHub repo.
45-
4642
`Purchase one from the Adafruit shop <http://www.adafruit.com/products/5836>`_
4743

4844
Installing from PyPI
4945
=====================
50-
.. note:: This library is not available on PyPI yet. Install documentation is included
51-
as a standard element. Stay tuned for PyPI availability!
52-
53-
.. todo:: Remove the above note if PyPI version is/will be available at time of release.
5446

5547
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
5648
PyPI <https://pypi.org/project/adafruit-circuitpython-ads7830/>`_.
@@ -101,8 +93,24 @@ Or the following command to update an existing version:
10193
Usage Example
10294
=============
10395

104-
.. todo:: Add a quick, simple example. It and other examples should live in the
105-
examples folder and be included in docs/examples.rst.
96+
.. code-block:: python
97+
import time
98+
import board
99+
import adafruit_ads7830
100+
101+
i2c = board.I2C()
102+
103+
# Initialize ADS7830
104+
adc = adafruit_ads7830.Adafruit_ADS7830(i2c)
105+
analog_inputs = []
106+
for i in range(8):
107+
c = adc.inputs[i]
108+
analog_inputs.append(c)
109+
110+
while True:
111+
for i in enumerate(analog_inputs):
112+
print(f"ADC input {i} = {analog_inputs[i].value}")
113+
time.sleep(0.1)
106114
107115
Documentation
108116
=============

0 commit comments

Comments
 (0)