Created
November 7, 2022 22:11
-
-
Save tfcollins/5e33aa394ab42238dd57dbd361d10eee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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