SerialWrite Mex

SerialWrite is written in C and allows you to write to a serial or com port.
1.8K Downloads
Updated 15 Apr 2009

View License

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
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Solar Power in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0