Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
John, Fabian
cosa-tools-matlab
Commits
c3919874
Commit
c3919874
authored
Jun 18, 2021
by
John, Fabian
Browse files
added stuff for slow analogue input acquisition
parent
4c6246d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/redpitaya/Oscilloscope_example.m
View file @
c3919874
...
...
@@ -10,6 +10,22 @@ 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
for
delay
=
-
1e-3
:
5e-5
:
1e-3
op
=
OscilloscopeProperties
();
% get an object of the OscilloscopeProperties class
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment