XBee

BlocklyProp reference for XBEE blocks

For Activity Board, FLiP, and Other board types. Not available for Badge or Scribbler Robot board types. I/O pin availability will vary with board type.

These blocks work with XBee 802.15.4 (series 1) RF modules.  For any XBee model, you may also use the Serial Initialize, Serial transmit, and Serial receive blocks for direct asynchronous serial communication.


XBee initialize

This block launches a processor automatically.

The XBee initialize block sets up a serial connection to an XBee module.

  • DO: Set the Propeller I/O pin connected to the XBee module's data out pin.*
  • DI: Set the Propeller I/O pin connected to the XBee module's data in pin.*
  • baud: set the baud rate at which to communicate with the XBee modules. Almost all XBee modules operate at 9600 baud, however, if your XBee module is configured to operate at a different baud rate, that can be set using this block as well.

* These drop-down options go from 0 to 27 but do not set higher than 17 with the Propeller Activity Board WX, as P18-P31 are already connected to other built-in circuits on this board. Use jumper wires to connect DO and DI sockets on the header in the middle of the board to I/O pin sockets alongside the breadboard.

If you have defined a constant using the constant define block, the constant will show up in all of the pin menus and can be selected instead of a numbered pin:


XBee transmit

The XBee transmit block sends a number (as an ASCII string in decimal format), a string, or a single byte depending on the option chosen using the drop-down menu.


XBee receive

The XBee receive block receives a number (as an ASCII string in decimal format), a string, or a single byte depending on the option chosen using the first drop-down menu and stores it in the variable selected in the second drop-down menu.


Xbee send multiple

The Xbee send multiple block is used to send attached values or text to the Xbee module.


Xbee receive multiple

The Xbee receive multiple block is used to receive numbers or characters from the Xbee module and store them in the specified variable.