How to constantly receive data from serial port without using fread all the time?

1 view (last 30 days)
Hi! I'm currently using Matlab to receive data via serial communication. Is there a way to constantly receive my data without the need of using the function fread all the time?

Accepted Answer

dpb
dpb on 1 Oct 2014
Edited: dpb on 1 Oct 2014
Well, no, not really...that's what fread does is to handle the incoming serial port for binary data.
What you're probably looking for is Events and Callbacks section under the Serial Port objects doc for techniques to get out of a polling mode to instead handle events.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!