Post Go back to editing

Reading out data through python not working [installation problems]

Category: Software
Product Number: ADXL313

Hi, thanks in advance for any help:

Setup:

ADXL313z accelerometer sensor -> sdp interface board rev2 -> blackfin eval-sdp-cb1z -> usb -> computer

on my laptop: win11, python 10, vscode with ubuntu WSL active, venv active

The board is already shared to wsl: lsusb shows `Bus 001 Device 002: ID 0456:b630 Analog Devices, Inc. Blackfin USB Device`

Issue: I cannot get my python code to access the data from the sensor. It never finds the sensor.

Also iio_config does not seem to ever work (i suspect the problem is here)
Library version: 0.23 (git tag: v0.23)

Compiled with backends: local xml ip usb

Unable to create Local IIO context : No such file or directory (2)

What i tried(i tried alot):

sudo dpkg -i libiio-0.26.ga0eca0d-Linux-Ubuntu-22.04.deb

pip install pylibiio

pip install pyadi-iio

Current code:

import adi
# Create the device interface using the USB bus and device number
sdr = adi.adxl313(uri="usb:1.2")  # Bus 001, Device 002

# Read data from the device
data = sdr.rx()

# Print the data
print(data)