Py Digilent
This repository contains an object oriented library for Digilent devices. It is written in Python 3 and has typing information. Typing means this library incompatible with earlier python versions.
This library has been developed and tested with the Digilent Analog Discovery 2. The library is written to support any digilent device supported by the digilent SDK. Class properties are generated at runtime based upon the connected hardware.
Installation
Via pip:
pip install pydigilent
Samples
Blinkity blink
from pydigilent import *
import time
ad2 = AnalogDiscovery2()
while True:
ad2.io.D0.value = not ad2.io.D0.value
time.sleep(2)
Power control
from pydigilent import *
import time
ad2 = AnalogDiscovery2()
v = 3.5
ad2.power.vplus.enable = 1
ad2.power.vplus.voltage = v
# after configuring power options, the master must be switched to enable
ad2.power.master.enable = 1
ad2.scope.channel1.vertical_division = 1.
while ad2.scope.channel1.voltage < v:
print(ad2.scope.channel1.voltage)
time.sleep(.5)
print(ad2.scope.channel1.voltage)
Scope
from pydigilent import *
import time
ad2 = AnalogDiscovery2()
# D0 and D8 are connected to scope channels 1 and 2 respectively
ad2.io.D0.value = 1
ad2.io.D8.value = 1
ad2.scope.channel1.vertical_division = .2
ad2.scope.horizontal_division = .0001
ad2.scope.channel1.offset = 3.
ad2.scope.channel2.offset = 2.5
ad2.scope.acquire()
while not ad2.scope.acquire_complete():
time.sleep(.1)
# show calls plt.show (displays in a separate window)
ad2.plot(ad2.scope.data, show=True)
Metadata
Release files for pydigilent 0.0.4
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 | Actions |
|---|---|---|---|---|
| pydigilent-0.0.4.tar.gz | 14.6 kB | Without provenance | Details for pydigilent-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydigilent-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for pydigilent-0.0.4-py3-none-any.whl |
Total release size: 28.8 kB
Release files / pydigilent-0.0.4.tar.gz
| Download URL | pydigilent-0.0.4.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abb6e3567e21507d77657272838e24a82d3c9d86f3a69ccdbb2dc9be10a1f372
|
|
BLAKE2b-256 checksum How to use checksums |
988c66fee03c9dda442a0e6a183c64e4a7cb887c83fcb0ecbc459581b8453cb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.0
|
Release files / pydigilent-0.0.4-py3-none-any.whl
| Download URL | pydigilent-0.0.4-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c95b6073ae5fd57a6e47727f91bb7752f86eff8a544d98e0878e6c1e96328f5e
|
|
BLAKE2b-256 checksum How to use checksums |
a956f65b8e15106f45a3dab7e5badabf8f9364e0b21a7618a7e1b6f6be1822e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.0
|
Security for pydigilent 0.0.4
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.