Skip to content
Angelo edited this page Sep 22, 2016 · 4 revisions

Introduction

This Wiki page attempts to briefly introduce how to use your Xbee module, keep in mind that due to being several different models, we will cover the Xbee configuration briefly.

Required Hardware

Connection Diagram

 Fig1: Setup A  fig1: setup b

Before you started

Download X-CTU software, and drivers if required for your operating system.

Configuring your module

Plug the Xbee on the adapter and connect to your computer as shown in Figure A. Refresh X-CTU, and read the configuration settings of your module.

Select the appropriate settings for your application.

Connecting your robot

Xbee has two modes of operating, once preconfigured is rather simple. Attach it to the IO expansion shield, Xbee shield or others to your robot or device. As shown in Figure B. Please remember that this shield version connects the Xbee to Arduino directly and not to the USB. While connected uploading a new sketch will not work due to Xbee module using the Serial port of Arduino

void setup() {
  // Select the same baud rate as your Xbee module
  Serial.begin(9600);
}

void loop() {
  // print on the serial for debugging purposes to check
  // whether or not the other Xbee is receiving.
  Serial.println("hello world");
  delay(1500);  // Add some delay, to avoid crashing the IDE and to allow reading easily.
}

Receiving data

On the other side, connect your second Xbee to your adapter and computer, Open up the X-CTU terminal or other serial software tool, select the same baud rate and read the "Hello World" string from our robot. Click the "Test / Query" button to test whether the XBee module has connected. If all goes well, we will see the following figure xbee test dialog,and it will display the module type and version number.  Fig3: Xbee_test first click on "modem parameters and firmware" in the "read" button to read out the current parameters xbee module, and then read out in the "networking & security" will "channel" is set to "c", the "pan id" setting "3332."  fig4: xbee_read in the "serial interfacing" the "interface data rate", you can modify the xbee baud rate, xbee module default baud rate 9600  fig5: xbee_write after he main parameters has been set up, click on "write" button to write the parameter to xbee module. the two xbee module parameter settings should be consistent. if you have changed the baud rate, and you suddenly want to "read" the xbee module parameters.it will go wrong, because you have to set the baud rate in x-ctu interface the "pc settings" option in the baud rate to what you set. and then you can read XBee module parameters.

Notes

  • Shields and other expansion boards connect the Xbee to Arduino directly, not to computer. Therefore you can't Use X-CTU. But you can let your Arduino do all the AT commands for you.

image:nextredirectltr.pngGo shopping [http://www.dfrobot.com/index.php?route=product/category&path=45_78| Xbee list] category: Product Manual category: TEL Series

category: Source category: Diagram category: DFRobot

category: Wireless

Clone this wiki locally