Infrared | lrf.infrared

Little Robot Friends have an infrared transceiver, which enable the robots to send and receive small pieces of information to and from each other. The infrared communication is intended for short distances, generally no more than 2 inches.

Functions called from within the "infrared" portion of the library have the prefix of lrf.infrared

enable()

Description

This function enables the Infrared transceiver, which allows for local communication between robots.

Examples

    lrf.infrared.enable();

Syntax

    enable()

Parameters

none

Returns

none

Notes

none


disable()

Description

This function disables the Infrared transceiver, which allows for local communication between robots.

Examples

    lrf.infrared.disable();

Syntax

    disable()

Parameters

none

Returns

none

Notes

none


writeMessage()

Description

Examples

    lrf.infrared.writeMessage(*myMsg);

Syntax

    writeMessage(*msg)

Parameters

Returns

none

Notes

This function makes use of the pointer symbol. *


writeBytes()

Description

Examples

    lrf.infrared.writeBytes(*myBytes,bytesLength);

Syntax

    writeBytes(*bytes, length)

Parameters

Returns

none

Notes

This function makes use of the pointer symbol. *


writeByte()

Description

Examples

    lrf.infrared.writeByte(myByte);

Syntax

    writeByte(byte)

Parameters

Returns

none

Notes

This function makes use of the pointer symbol. *


readMessage()

Description

Examples

    lrf.infrared.readMessage(*myMsg);

Syntax

    readMessage(*msg)
    readMessage(*msg, timeout)

Parameters

Returns

none

Notes

This function makes use of the pointer symbol. *


readBytes()

Description

Examples

    lrf.infrared.readBytes(*myBytes, bytesLength);

Syntax

    readBytes(*bytes, length)
    readBytes(*bytes, length, timeout)

Parameters

Returns

none

Notes

This function makes use of the pointer symbol. *


readBytes()

Description

Examples

    lrf.infrared.readByte(*myByte);

Syntax

    readByte(*byte)
    readByte(*byte, timeout)

Parameters

Returns

none

Notes

This function makes use of the pointer symbol. *