Hello when I try to call this function I get the error :Error using serial_setup (line 18) Not enough input arguments.
Show older comments
function [s]=serial_setup(com)
s=serial(com);
set(s,'Baudrate',9600);
set(s,'Databits',8);
set(s,'Stopbits',1);
set(s,'Parity','none');
fopen(s);
b=99;
while b~='a'
b=fread(s,1,'uchar');
end
fscanf(s,'%d');
fprintf(s,'%c','a');
success=fscanf(s,'%c');
success(and)=[]; %delete ASCII 13
success(and)=[]; %delete ASCII 10
if success=='Serial Setup'
xbox=msgbox(success);uiwait(xbox);
end
Accepted Answer
More Answers (0)
Categories
Find more on Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!