PyADI-IIO#

Note

This section only gives an overview on pyadi-iio, for all details, see the dedicated doc.

To simplify the use of different devices a python package was created interface with the different IIO drivers. The module pyadi-iio, provides device-specific APIs built on top of the current libIIO python bindings. These interfaces try to match the driver naming as much as possible without the need to understand the complexities of libIIO and IIO. In general, if you are familiar with python this is a great starting point for using different ADI parts and can even run on some ADI development systems as well.

Basic Installation#

There are three steps required to setup PyADI-IIO:

  1. Download and Install LibIIO

  2. Download and Install Python

  3. Install the PyADI-IIO bindings

Tip

See Quick Start for a concise guide if you are familiar with python.

Windows Installation#

  1. Download and install the latest release of LibIIO from ADI libiio repository (releases).

  2. Download and install Python for Windows.

  3. Install the libIIO bindings through pip.

    pip install pylibiio
    
  4. Install the PyADI-IIO through pip.

    pip install pyadi-iio
    
  5. Extra: if you need to Update/Overwrite your PyADI-IIO through pip, use the following command.

    pip install -U pyadi-iio
    

Linux Installation#

  1. It is recommended that Linux users build libiio from the build instructions

    • Note that since v0.19 libiio requires cmake flags to enable the python bindings during installation.

  2. Make sure you have at least Python 3.6 or newer installed

  3. Install the libIIO bindings through pip.

    pip install pylibiio
        * Make sure you are using the Python 3 version of pip. That might be pip3.
    
  4. Install the PyADI-IIO through pip.

    pip install pyadi-iio
        * Make sure you are using the Python 3 version of pip. That might be pip3.
    

Mac OS Installation#

  1. It is recommended that Mac OS users build libiio from the build instructions

    • Note that since v0.19 libiio requires cmake flags to enable the python bindings during installation.

  2. Make sure you have at least Python 3.6 or newer installed

  3. Install the libIIO bindings through pip.

    pip install pylibiio
    
  4. Install the PyADI-IIO through pip.

    pip install pyadi-iio
    

Examples#

Devices specific examples are available in the source repo, and the dedicated doc, but here is the basic idea

# Import library
import adi
# Create radio object
sdr = adi.Pluto()
# Configure properties
sdr.rx_rf_bandwidth = 4000000
# Get data
data = sdr.rx()

Supported Devices/Parts#

See repo readme for supported hardware.

Support#

Documentation#

  • All PyADI-IIO documentation is available here.

Support Questions#

Please direct support question or enhancement requests to the Software Interface Tools Forums on EngineerZone