SerialIO mex
Although MATLAB is supposed to support both writing and reading data from the serial port, reading data seems to either produce no result, generate an error, or crash MATLAB. To remedy the situation SerialIO() has been written. This function will allow you to set/get vectors of data from the serial port buffer.
To help, type "SerialIO('help');
s = SerialIO('open','com2',19200);
SerialIO('write',x,3);
y=SerialIO('read',6);
SerialIO('close');
Note: to compile "mex SerialIO.cpp"
Cite As
Lorgio Teodovich (2024). SerialIO mex (https://www.mathworks.com/matlabcentral/fileexchange/25478-serialio-mex), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.