ar_read: Read one entry of input from an opened serial connection

Description Usage Arguments Examples

Description

This function reads one entry of input from an opened serial port. Each line of entry is identified by the end of line character eolchar.

Usage

1
ar_read(fd, eolchar = "\n", buf_max = 256L, timeout = 5000L)

Arguments

fd

File descriptor returned by ar_init(). Should be an integer.

eolchar

End of line character. Default value is '\n'

buf_max

Maximum length of one line of entry. Default is 256.

timeout

Timeout for reads in millisecs. Default is 5000 ms.

Examples

1
2
3
4
5
## Not run: 
con <- ar_init("/dev/cu.SLAB_USBtoUART")
ar_read(con)

## End(Not run)

r-arduino/arduino documentation built on May 16, 2019, 5:02 a.m.