Info

This question is closed. Reopen it to edit or answer.

how can make loop ??

1 view (last 30 days)
Abdoo
Abdoo on 22 Nov 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
please help me .. i wanna make loop for my receive data, my program only receive data one time. the is the code:
s=serial('com1');
set(s,'BaudRate',9600);
fopen(s);
s.Terminator = 'CR';
B=fgets(s);
set(handles.text1,'string',B);
fclose(s)
delete(s)
clear s
  3 Comments
Geoff Hayes
Geoff Hayes on 25 Nov 2014
Abdoo - I won't be able to run your GUI since I have no source to send data to the GUI via the serial port. Look at the links I posted, and consider how you can work that in to your code.

Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!