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 XBee ON. 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_900HP 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:
{
xbee900HP.ON();
}

Setting off

The OFF() function closes the UART and switches the XBee OFF.
Example of use:
{
xbee900HP.OFF();
}
Copy link