File tree Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -39,18 +39,10 @@ or individual libraries can be installed using
39
39
`circup <https://github.com/adafruit/circup >`_.
40
40
41
41
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
-
46
42
`Purchase one from the Adafruit shop <http://www.adafruit.com/products/5836 >`_
47
43
48
44
Installing from PyPI
49
45
=====================
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.
54
46
55
47
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
56
48
PyPI <https://pypi.org/project/adafruit-circuitpython-ads7830/> `_.
@@ -101,8 +93,24 @@ Or the following command to update an existing version:
101
93
Usage Example
102
94
=============
103
95
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 )
106
114
107
115
Documentation
108
116
=============
You can’t perform that action at this time.
0 commit comments