|Top Previous Next|
Sends text data to the serial port.
Cell.Serial[n].write(data [, data ...])
Zero if successful, or a negative number if failure.
If data is Boolean, number, or array, it is converted to a string. If data is undefined or null it is skipped.
If the serial port's output buffer has sufficient free space, this function will return immediately. Otherwise, execution will pause while data is sent. The bytesCanWrite property returns how many bytes are free in the output buffer.
This function can fail if the serial port has not been enabled by setting its bitRate property to a positive value.
Cell.Serial.bitRate = 9600;
val = 92;
Cell.Serial.write("Value is: ", val);
Cell.Serial.write("; Acceptable: ", val >= 100, "\r\n");