Skip to main content

Python Bindings for Digilent WaveForms API

Project description

Python Bindings for Digilent WaveForms API

The dwfpy package allows you to access Digilent WaveForms devices via Python.

Supported devices include all WaveForms devices, such as the Analog Discovery 2 or the Digital Discovery.

The source code for the dwfpy package can be found at GitHub at https://github.com/mariusgreuel/dwfpy.

Features

  • Pythonic abstraction of Digilent Waveforms devices.
  • Low-level API with complete access to the DWF API.
  • High-level API that supports one-line configuration statements.

One of the design goals is to provide users with a simple high-level API that allows one to perform common tasks quickly, while hiding some of the complexity of the WaveForms API.

For instance, to output a sine-wave on a Analog Discovery 2, you can simply write:

import dwfpy as dwf

with dwf.AnalogDiscovery2() as device:
    print('Generating a 1kHz sine wave on WaveGen channel 1...')
    device.analog_output['ch1'].setup('sine', frequency=1e3, amplitude=1, start=True)
    input('Press Enter key to exit.')

Installing dwfpy

You can install the dwfpy package from PyPI using pip:

pip install dwfpy

In order to use the dwfpy package, you need Python 3.6 or higher.

As dwfpy builds on top of the WaveForms API, you need to install the WaveForms software, which includes the required runtime components to access the WaveForms devices.

Documentation

You can find the dwfpy user's guide at https://dwfpy.readthedocs.io/.

Detailed information about the Digilent Waveforms API is available from the Digilent WaveForms SDK Reference Manual.

Examples

You can find examples using dwfpy in the dwfpy GitHub repository at https://github.com/mariusgreuel/dwfpy/tree/main/examples.

Getting help

For issues with dwfpy, please visit the dwfpy issue tracker.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dwfpy-1.1.0.tar.gz (50.9 kB view hashes)

Uploaded Source

Built Distribution

dwfpy-1.1.0-py3-none-any.whl (58.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page