write.serialConnection: Wirtes data to serial interface.

Description Usage Arguments Details Value See Also Examples

View source: R/write.R

Description

Writes to a serial connection in ascii or binary mode.

Usage

1

Arguments

con

serial Connection

dat

data string to write on the serial interface. This must be a string '...' in case of ascii communication. In case of binary communication also numeric vectors are allowed. See examle section in serial.

Details

In normal operation mode (non-binary ascii mode) write.serialConnection respects the translation and adds the end-of-line characters (\n;\r) according to the settings. Any input is converted to character, i.e. c(1,2,3) becomes '123' and so on.

In binary mode no end-of-line characters are added. The input argument must be of type raw or string. If dat is numeric (vector) it is converted to raw.

Value

The status of success 'DONE' or 'Nothing to do' is returned.

See Also

serial

Examples

1
2
3
 # See the top package documentation
 
 ## Not run: write.serialConnection(con, 'Hello World!')

serial documentation built on July 1, 2020, 10:53 p.m.