Nevermind, I solved my problem.
I know this is bad netiquette. But i figure that when one pays €244,00 for a piece of hardware at least the documentation should be up to date.
To get the example running you need to place the module
https://raw.githubusercontent.com/RedPi ... ya_scpi.py in the same folder the blink.py example is in. Also don't forget to start the scpi server:
Code: Select all
redpitaya> systemctl start redpitaya_scpi &
Where it says edit the source and enter your RedPitaya's IP address ...
Code: Select all
#!/usr/bin/python
import sys
import time
import redpitaya_scpi as scpi
rp_s = scpi.scpi(sys.argv[1])
if (len(sys.argv) > 2):
led = int(sys.argv[2])
else:
led = 0
print ("Blinking LED["+str(led)+"]")
period = 1 # seconds
while 1:
time.sleep(period/2.0)
rp_s.tx_txt('DIG:PIN LED' + str(led) + ',' + str(1))
time.sleep(period/2.0)
rp_s.tx_txt('DIG:PIN LED' + str(led) + ',' + str(0))
This script should be called from the commandline using:
Or one could edit the file and replace sys.argv[1] in the scpi.scpi() call with '<IP-address>'
Running scripts directly from RedPitaya is the next step.