<< serialstatus serial

serial >> serial > writeserial

writeserial

write to the serial port

Syntax

err = writeserial(h, buf)

Parameters

h

string, Tcl handle to the serial port

buf

string to be output

err

error flag: 0 if writing was successfull, -1 otherwise

Description

No end of line character is appended to the string; the user might have to add it if the device being talked to requires it. The Tcl command puts -nonewline is used. In addition, the translation mode of openserial can come into way.

Examples

h = openserial(1,"9600,n,8,1")
writeserial(h,"#02"+ascii(13))
readserial(h)
closeserial(h)

See Also

Contributors

Enrico SEGRE
Aditya SENGUPTA <apsengupta@iitb.ac.in>
Samuel GOUGEON

Bibliography


Report an issue
<< serialstatus serial