Description
An unofficial Python interface for the Cleware USB-ADC 2 utilizing cython-hidapi.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
License
clewareADC is provided under the MIT license (see LICENSE).
Install
Download clewareADC:
git clone https://gitlab.com/darkforce/clewareADC.git cd clewareADC
Install using setuptools:
python setup.py install
Usage
The folowing code will list all connected USB-ADC 2 devices, connect to the first device it finds and print ten values from both channels, scaled by 13.621V:
import time
from clewareADC import ClewareADC
deviceList = ClewareADC.listDevices()
if len(deviceList) < 1:
raise Exception('No ADCs found')
for device in deviceList:
print('Found ADC at {} with serial number {}'.format(device[0], device[1]))
print('')
with ClewareADC(13.621, deviceList[0][1]) as adc:
print('Reading from ADC {} with 13.621V scaling:'.format(deviceList[0][1]))
for i in range(10):
ch0 = adc.readChannel(0)
ch1 = adc.readChannel(1)
print(' Ch 0: {}V, Ch 1: {}V'.format(ch0, ch1))
time.sleep(1.00)
Metadata
Release files for clewareADC 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| clewareADC-0.2.tar.gz | 4.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| clewareADC-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.0 kB
Release files / clewareADC-0.2.tar.gz
| Download URL | clewareADC-0.2.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d78e3844c8647b6d09d1b8462ef1d894c438c5316432e2ebce9ed4a830bca1c
|
|
BLAKE2b-256 checksum How to use checksums |
54d50a3e82589ea49d8d6edfadcc998e7fea987a50c1b42155b203d0ed6541e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / clewareADC-0.2-py3-none-any.whl
| Download URL | clewareADC-0.2-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8133c2c9667dc1c4ee4f170323959b0890bbf4bc509ac8b3f87c5e87a690106
|
|
BLAKE2b-256 checksum How to use checksums |
7498c44608a366474939b92c0a3f2a3c4cf57f7de0375988eeae67a4b2a1314e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for clewareADC 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.