0

I am trying to run the following code on Thonny using an SDR.

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

However, I get the following error:
sdr = adi.Pluto() AttributeError: module 'adi' has no attribute 'Pluto'

I have installed the 'libiio' system library and I have also installed the 'adi' library.

I have also tried to import the 'adi' module and check for the available attributes using the dir() function: "print(dir(adi))" The available outputs are: "['cached', 'doc', 'file', 'loader', 'name', 'package', 'path', 'spec']", which confirms that the Pluto attribute is missing.

How can I solve this problem?

The code should work fine. However I have problems with Thonny.

Roby
  • 25
  • 5

0 Answers0