ecoc measurements

This commit is contained in:
Silas Labor Zizou
2025-04-13 16:29:12 +02:00
parent 00f1c557c0
commit 0236103b13
19 changed files with 709 additions and 359 deletions

View File

@@ -32,14 +32,30 @@ classdef Thor_PDFA < handle
end
end
obj.getStatus();
end
function o = connectSerial(obj)
% Connect to the PDFA
o = serialport(obj.serialport_number, 9600);
configureTerminator(o, "CR", "CR"); % Set the terminator to carriage return (CR)
flush(o);
try
% Connect to the PDFA
o = serialport(obj.serialport_number, 9600);
configureTerminator(o, "CR", "CR"); % Set the terminator to carriage return (CR)
flush(o);
catch ME
disp(['Error connecting to PDFA: ', ME.message]);
% List available serial ports
availablePorts = serialportlist("available");
if isempty(availablePorts)
disp('No available serial ports found.');
else
disp('Available serial ports:');
disp(availablePorts);
end
end
end