SerialWrite Mex
SerialWrite is written in C and allows you to write to a serial port without using the Matlab SERIAL interface. The reason for this is that Matlab's SERIAL often crashes/"Times out". The code is short and easy to understand for future modifications, or it can be used as is.
serial_write('open', 'COM40', 57600);
serial_write('write', 'Hello');
serial_write('write_line', ', World'); % Adds the \r\n
serial_write('close');
Cite As
Kevin Barry (2024). SerialWrite Mex (https://www.mathworks.com/matlabcentral/fileexchange/23780-serialwrite-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.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |