Post Go back to editing

I can't launch adis16507_example.py of the pyadi-iio project

Category: Software
Product Number: adis16507-1
Software Version: pyadi-iio

Hello,

I want to launch the example adis16507_example.py of the  pyadi-iio project on my raspberry pi 4.

However, I have errors on which I stumbled for a while.

$  python3 adis16507_example.py
 
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/adi/context_manager.py", line 65, in __init__
    self._ctx = iio.Context(self.uri)
  File "/usr/local/lib/python3.10/dist-packages/iio.py", line 1358, in __init__
    self._context = _new_uri(_context.encode("ascii"))
  File "/usr/local/lib/python3.10/dist-packages/iio.py", line 56, in _check_null
    raise OSError(err, _strerror(err))
OSError: [Errno 6] No such device or address

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/pyadi-iio/examples/adis16507_example.py", line 39, in <module>
    imu = adi.adis16507(uri="ip:analog")
  File "/usr/local/lib/python3.10/dist-packages/adi/adis16507.py", line 59, in __init__
    context_manager.__init__(self, uri, self._device_name)
  File "/usr/local/lib/python3.10/dist-packages/adi/context_manager.py", line 67, in __init__
    raise Exception("No device found")
Exception: No device found

My sensor is well connected and functional because I can read the values of the sensor:

$ cat /sys/bus/iio/devices/iio\:device0/in_anglvel_z_raw

-3819836

Do you have an idea?

Thanks in advance.

Dimitri Sigg