Initialization

Before starting to use a module, it needs to be initialized. During this process, the UART to communicate with the module has to be opened and the XBee switch has to be set on.

Setting on

The ON() function initializes all the global variables, opens the correspondent UART and switches the XBeeON. The baudrate used to open the UART is defined in the library (115200bps by default).

It returns nothing.

The initialized variables are:

  • protocol: specifies the protocol used (XBEE_868 in this case)

  • discoveryOptions : specifies the options in Node Discovery

  • scanTime : specifies the time to scan each channel

  • encryptMode : specifies if encryption mode is enabled

  • timeRSSI : specifies the time RSSI LEDs are on

Example of use:

{
    xbee868LP.ON();
}

Setting off

The OFF() function closes the UART and switches the XBee off.

Example of use:

{
    xbee868LP.OFF()
}

Last updated