Commit 7b1c330b authored by Lindenberg, Arthur-Vincent's avatar Lindenberg, Arthur-Vincent
Browse files

Slow analog reading separated into new example

parent c3919874
......@@ -11,20 +11,6 @@ addpath('../../lib/redpitaya');
myMqtt = mqtt_py_matlab(py_path);
myMqtt.connect_mqtt(broker_ip);
while 1
myMqtt.sub_mqtt_topics(broker_ip, "RP1/raw/AI");
myMqtt.pub_mqtt(broker_ip, "RP1/CONFIGURE/READ_AI", "NONE");
arr = myMqtt.get_payload_float("RP1/raw/AI");
y_mat = cell2mat(cell(arr));
% Plot input 1
%subplot (2,1,1)
plot(1:4, y_mat);
ylim([-2,2]);
grid on;
drawnow;
end
for delay = -1e-3:5e-5:1e-3
op = OscilloscopeProperties(); % get an object of the OscilloscopeProperties class
......
%% alter path to your python (3.8 is tested) distribution here
py_path = 'C:\Users\49151\AppData\Local\Programs\Python\Python37\python.exe';
broker_ip = '192.168.0.1';
%% Init components
%oscilloscope properties --> delivering mqtt string for RedPitaya Inputs
%mqtt stuff
addpath('../../lib');
addpath('../../lib/redpitaya');
myMqtt = mqtt_py_matlab(py_path);
myMqtt.connect_mqtt(broker_ip);
while 1
myMqtt.sub_mqtt_topics(broker_ip, "RP1/raw/AI");
myMqtt.pub_mqtt(broker_ip, "RP1/CONFIGURE/READ_AI", "NONE");
arr = myMqtt.get_payload_float("RP1/raw/AI");
y_mat = cell2mat(cell(arr));
% Plot input 1
%subplot (2,1,1)
plot(1:4, y_mat);
ylim([-2,2]);
grid on;
drawnow;
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment