serial_read()
Reads string type data trough serial COM port and prints it in the output window.
Syntax
serial_read(port, size, timeout);
Parameters
| port | COM port name. Use string type, e.g. “COM10”. | |
| size | Data size limit. Special values are: | (optional) |
| 0 - no limit in data size | |
| 256 - max value of limit | |
| timeout | Timeout value in milliseconds. After time is elapsed, COM port will not read any incoming data. | (optional) |
| Return Value | Returned value is string data size. Returned value is integer number. | |
Example
result = serial_read("COM10", 0);
result:
Output:
See also