Skip to content

Instantly share code, notes, and snippets.

@tfcollins
Created November 7, 2022 22:11
Show Gist options
  • Save tfcollins/5e33aa394ab42238dd57dbd361d10eee to your computer and use it in GitHub Desktop.
Save tfcollins/5e33aa394ab42238dd57dbd361d10eee to your computer and use it in GitHub Desktop.
import numpy as np
import adi
iio_uri = "ip:10.48.65.153"
class LLDR(adi.rx_tx.rx_tx_def):
_complex_data = False
_control_device_name = "ad3552r"
_tx_data_device_name = "ad3552r"
_rx_data_device_name = "ltc2387"
def __post_init__(self):
pass
dev = LLDR(iio_uri)
data = np.array([1,2,3,4,5,6,7,8,9,10])
dev.tx_enabled_channels = [0]
dev.tx(data)
dev.rx_buffer_size = 2 ** 13
dev.rx_enabled_channels = [1]
out = dev.rx()
# Plot the data
import matplotlib.pyplot as plt
for c in [out]:
plt.plot(c)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment