Package comm
Class I2C

Public Method setTimeout

static void setTimeout(int ms)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Parameter Description
ms value for the timeout in milliseconds

This method is used to set up the time value for timeout. The timeout is used in start, reStart, write, read, poll, and status methods to provide a defined time frame for data processing. Connected devices should return messages whitin the time frame, otherwise an error code is returned. The default value for the timeout is 50 milliseconds and is automatically set by the constructor.

Example

The following example sets up a timeout of 100 milliseconds.

   i2c.timeout(100);

See also:

SPI
UART