how to use BytesAvailable for reading serial data on raspberry pi over matlab ?

I am trying to do the same thing BytesAvailable does in matlab when trying to read data over a Serial port but through a raspberry pi this time.
the read() function to read data over the serial pins of the raspberry does not include a BytesAvailable function, is there anyway around it ?

1 Comment

BytesAvailable is a property of a serial object. If you've used the serial function to connect to the Raspberry Pi, it will have BytesAvailable and should function exactly as with any other serial connection.
For completeness, run
properties(obj) % where |obj| is the same first input as to your read()

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB Support Package for Raspberry Pi Hardware in Help Center and File Exchange

Products

Release

R2018a

Asked:

on 11 May 2018

Commented:

on 12 May 2018

Community Treasure Hunt

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

Start Hunting!