Post Go back to editing

Reading out data through python not working [installation problems]

Thread Summary

The user is unable to access data from an ADXL313z accelerometer using Python on a Windows 11 system with WSL and a Blackfin eval-sdp-cb1z board. The final answer suggests using the ADXL313z-specific GUI software for quick evaluation or direct pin connections to a microcontroller or Raspberry Pi for more flexible control and raw data access. The user confirms the need for raw data and asks about boards with easier Python or Arduino access, to which the engineer recommends verifying the setup in the Linux software forum and potentially using a Raspberry Pi with the Kuiper Linux image.
AI Generated Content
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)