Guide.ArduinoXbeeShield History

Hide minor edits - Show changes to markup

June 02, 2010, at 06:24 PM by Equipo Traduccion -
Changed lines 9-10 from:

Para cargar un programa a la placa Arduino con XBee shield, necesitarás poner los dos jumpers del shield en la posición USB (coloca los dos jumpers en la parte cercana al borde de la placa) o quítalos completamente (asegurate de no perderlos!). Luego, ya puedes cargar un programa con normalidad desde el Arduino IDE. En este caso, carga el programa Communication | Physical Pixel a una de las placas. Este programa manda a la placa encender el LED conectado al pin 13 cuando recibe 'H' por el puerto serie y lo apaga cuando recibe 'L'. You can probarlo conectando la placa con el monitor de puerto serie de Arduino (asegurate de configurarlo a 9600 baudios), escribiendo H y INTRO (o pinchando en "send") el LED debería encenderse. Envía L y el LED debería apagarse. Si no ocurre nada, es posible que tengas un Arduino que no tiene el LED conectado al pin 13 montado en la placa (mira aquí board index para asegurarte), en este caso tendrás que conectar tu propio led.

to:

Para cargar un programa a la placa Arduino con XBee shield, necesitarás poner los dos jumpers del shield en la posición USB (coloca los dos jumpers en la parte cercana al borde de la placa) o quítalos completamente (asegurate de no perderlos!). Luego, ya puedes cargar un programa con normalidad desde el Arduino IDE. En este caso, carga el programa Communication | Physical Pixel a una de las placas. Este programa manda a la placa encender el LED conectado al pin 13 cuando recibe 'H' por el puerto serie y lo apaga cuando recibe 'L'. You can probarlo conectando la placa con el monitor de puerto serie de Arduino (asegurate de configurarlo a 9600 baudios), escribiendo H y INTRO (o pinchando en "send") el LED debería encenderse. Envía L y el LED debería apagarse. Si no ocurre nada, es posible que tengas un Arduino que no tiene el LED conectado al pin 13 montado en la placa (mira el índice de placas para asegurarte), en este caso tendrás que conectar tu propio led.

June 02, 2010, at 09:05 AM by Equipo Traduccion -
Added line 103:
June 02, 2010, at 08:58 AM by Equipo Traduccion -
Changed lines 28-30 from:

Cuando se hay cargado el programa, puedes comprobar que funciona con el monitor de puerto serie de Arduino. Deberías ver H's y L's llegando cada segundo. Apaga el monitor de puerto serie y desconecta la placa. Cambia los jumpers a la posición XBee. Ahora conecta las dos placas al ordenador, después de unos segundos, deberías ver el LED de la primera placa encenderse y apagarse cada segundo (el LED de la placa Arduino, no el LED de la placa XBee shield, que proporciona información sobre els estado del módulo XBee). Si funciona así enhorabuena, tus placas Arduino se están comunicando inalámbricamente. Puede que esto no parezca muy excitante si las placas están conectadas al mismo ordenador, pero si las conectas en diferentes ordenadores (o las alimentas con fuentes de alimentación externas - asegurandote de cambiar el jumper de alimentación en la placa Arduino), también deberían ser capaces de comunicarse.

to:

Cuando se haya cargado el programa, puedes comprobar que funciona con el monitor de puerto serie de Arduino. Deberías ver H's y L's llegando cada segundo. Apaga el monitor de puerto serie y desconecta la placa. Cambia los jumpers a la posición XBee. Ahora conecta las dos placas al ordenador, después de unos segundos, deberías ver el LED de la primera placa encenderse y apagarse cada segundo (el LED de la placa Arduino, no el LED de la placa XBee shield, que proporciona información sobre els estado del módulo XBee). Si funciona así enhorabuena, tus placas Arduino se están comunicando inalámbricamente. Puede que esto no parezca muy excitante si las placas están conectadas al mismo ordenador, pero si las conectas en diferentes ordenadores (o las alimentas con fuentes de alimentación externas - asegurandote de cambiar el jumper de alimentación en la placa Arduino), también deberían ser capaces de comunicarse.

Changed line 102 from:

Para más información, mira: la hardware page del XBee shield, la wiki de Libelium SquidBee, y la página de Maxstream XBee.

to:

Para más información, mira: la hardware page del XBee shield, la wiki de Libelium SquidBee, y la página de Maxstream XBee.

June 02, 2010, at 08:57 AM by Equipo Traduccion -
Changed lines 56-57 from:
to:
Changed lines 62-64 from:

followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with), use the 'ATID command:

to:

Para cambiar el valor del ID de red del módulo:

Changed lines 65-68 from:
to:
Changed lines 71-72 from:

To change the network ID of the module:

to:

Ahora, comprueba que el parámetro se ha configurado:

Changed lines 74-77 from:
to:
Changed lines 80-81 from:

Now, check that the setting has taken effect:

to:

A no ser que le digas al módulo que escriba los cambios a la memoria no volátil, esos cambios sólo tendrán efecto hasta que el módulo pierda la alimentación. Para guardar los cambios de forma permamente (hasta que los modifiques otra vez) usa el comando ATWR:

Changed lines 83-86 from:
to:
Changed lines 89-90 from:

Unless you tell the module to write the changes to non-volatile (long-term) memory, they will only be in effect until the module loses power. To save the changes permanently (until you explicitly modify them again), use the ATWR command:

to:

Para resetear el módulo a los valores de fábrica, usa el comando ATRE:

Changed lines 92-94 from:
to:
Changed lines 98-111 from:
to:

Ten en cuenta que al igual que los demás comandos, el reset no será permanente a no ser que después envíes el comando ATWR

Referencias

Para más información, mira: la hardware page del XBee shield, la wiki de Libelium SquidBee, y la página de Maxstream XBee.

June 02, 2010, at 08:42 AM by Equipo Traduccion -
Changed lines 53-59 from:

Una vez en el modo de configuración, puedes envíar comandos AT al modulo


Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with), use the 'ATID command:

to:

Una vez en el modo de configuración, puedes enviar comandos AT al módulo. Las cadenas de comandos AT tienen la forma ATXX (donde XX es el nombre del parámetro). Para leer el valor actual de un parámetro, envía la cadena de comando AT seguido de retorno de carro (<CR>). Para escribir un nuevo valor del parámetro, envía la cadena de comando AT, seguido del nuevo valor (sin espacios o nueva línea por medio), seguido de retorno de carro. Por ejemplo, para leer el identificador (ID) de red del módulo (que determina con qué otros módulos XBee se comunicará), usa el comando ATID

Changed lines 62-63 from:

To change the network ID of the module:

to:

followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with), use the 'ATID command:

Changed lines 68-69 from:
to:
Changed lines 72-73 from:

Now, check that the setting has taken effect:

to:

To change the network ID of the module:

Changed lines 77-78 from:
to:
Changed lines 81-82 from:

Unless you tell the module to write the changes to non-volatile (long-term) memory, they will only be in effect until the module loses power. To save the changes permanently (until you explicitly modify them again), use the ATWR command:

to:

Now, check that the setting has taken effect:

Changed lines 86-87 from:
to:
Changed lines 90-91 from:

To reset the module to the factory settings, use the ATRE command:

to:

Unless you tell the module to write the changes to non-volatile (long-term) memory, they will only be in effect until the module loses power. To save the changes permanently (until you explicitly modify them again), use the ATWR command:

Changed line 95 from:
to:
Added lines 99-107:
June 02, 2010, at 08:31 AM by Equipo Traduccion -
Changed lines 43-46 from:

To get the module into configuration mode, you need to send it three plus signs: +++ and there needs to be at least one second before and after during which you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.

to:

Para entran en el modo de configuración, necesitas enviar tres signos '+': +++ y no enviar ningún otro carácter al módulo durante un segundo antes y un segundo después. Esto incluye carácteres especiales como retorno de carro o nueva línea. Por lo tanto, si estas intentando configurar el modulo desde el ordenador, asegúrate de que tu terminal está configurado para enviar los carácteres tal como los escribes, sin esperar a que pulses intro. Sino, enviará los tres signos '+' seguidos de nueva línea (de modo que no esperará un segundo después de enviar +++). Si consigues entrar en el modo de configuración, el módulo enviará de vuelta 'OK', seguido de retorno de carro.

Changed lines 47-48 from:
to:
Added lines 53-57:

Una vez en el modo de configuración, puedes envíar comandos AT al modulo


June 01, 2010, at 10:34 PM by Equipo Traduccion -
June 01, 2010, at 10:32 PM by Equipo Traduccion -
Changed lines 31-42 from:

A Few Notes

You can use any of the standard Arduino serial commands with the Xbee shield. With the shield's jumpers in the Xbee position, the print and println commands will send data over the Xbee shield and the USB connection (i.e. to other Xbee shields and to the computer at the same time). In this configuration, however, the board will only receive data from the Xbee shield not from the USB connection (you'll need to switch the jumpers to allow the board to receive data from the computer).

The Xbee module on the shield is set up to work at 9600 baud by default, so unless you reconfigure it, you'll need to make sure you're passing 9600 to the Serial.begin() command in your sketch.

To allow your computer to communicate directly with the Xbee shield, connect it to an Arduino board whose microcontroller has been removed and place its jumpers in the USB configuration. Then you can send data to and receive data from the Xbee module from any terminal program. This allows you, for example, to see the data that the module is receiving from other Xbee shields (e.g. to collect sensor data wirelessly from a number of locations).

Configuring the Xbee Module

You can configure the Xbee module from code running on the Arduino board or from software on the computer. To configure it from the Arduino board, you'll need to have the jumpers in the Xbee position. To configure it from the computer, you'll need to have the jumpers in the USB configuration and have removed the microncontroller from your Arduino board.

to:

Unas notas

Puedes usar cualquiera de los comandos serie estándar de Arduino con el XBee shield. Con los jumpers del shield en la posición XBee, los comandos print y println enviarán los datos al XBee shield y al puerto USB (o lo que es lo mismo a otros XBee shields y al ordenador al mismo tiempo). Con esta configuración, sin embargo, la placa sólo recibirá datos del XBee shield, no de la conexión USB (necesitas cambiar la posición de los jumpers para permitir que la placa reciba datos del ordenador).

El modulo XBee del shield está configurado para trabajar a 9600 baudios por defecto, a menos que le cambies la configuración, tienes que asegurarte de llamar a la función Serial.begin(); con el parámetro 9600 (Serial.begin(9600);) en tu programa.

Para permitir que tu ordenador se comunique directamente con el XBee shield, conéctalo a una placa Arduino sin microcontrolador y coloca los jumpers en la posición USB. Entonces puedes enviar y recibir datos desde el módulo XBee utilizando cualquier terminal de puerto serie. Esto te permite, por ejemplo, ver los datos que el módulo está recibiendo de otros XBee shields (por ejemplo monitorizando datos de sensores inalámbricamente desde un cierto número de localizaciones).

Configurando el módulo XBee

Puedes configurar el módulo XBee mediante el código que ejecuta el Arduino o dese un software del ordenador. Para configurarlo desde el Arduino, necesitas colocar los jumpers en la posición XBee. Para configurarlo desde el ordenador, necesitas colocar los jumpers en la posición USB y haber quitado el microcontrolador del Arduino.


June 01, 2010, at 10:18 PM by Equipo Traduccion -
Changed lines 28-30 from:

When it's finished uploading, you can check that it's working with the Arduino serial monitor. You should see H's and L's arriving one a second. Turn off the serial monitor and unplug the board. Switch the jumpers to the Xbee setting. Now connect both boards to the computer. After a few seconds, you should see the LED on the first board turn on and off, once a second. (This is the LED on the Arduino board itself, not the one on the Xbee shield, which conveys information about the state of the Xbee module.) If so, congratulations, your Arduino boards are communicating wirelessly. This may not seem that exciting when both boards are connected to the same computer, but if you connect them to different computers (or power them with an external power supply - being sure to switch the power jumper on the Arduino board), they should still be able to communicate.

to:

Cuando se hay cargado el programa, puedes comprobar que funciona con el monitor de puerto serie de Arduino. Deberías ver H's y L's llegando cada segundo. Apaga el monitor de puerto serie y desconecta la placa. Cambia los jumpers a la posición XBee. Ahora conecta las dos placas al ordenador, después de unos segundos, deberías ver el LED de la primera placa encenderse y apagarse cada segundo (el LED de la placa Arduino, no el LED de la placa XBee shield, que proporciona información sobre els estado del módulo XBee). Si funciona así enhorabuena, tus placas Arduino se están comunicando inalámbricamente. Puede que esto no parezca muy excitante si las placas están conectadas al mismo ordenador, pero si las conectas en diferentes ordenadores (o las alimentas con fuentes de alimentación externas - asegurandote de cambiar el jumper de alimentación en la placa Arduino), también deberían ser capaces de comunicarse.

June 01, 2010, at 08:25 PM by Equipo Traduccion -
Changed lines 3-12 from:

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium. This documentation describes the use of the shield with the XBee 802.15.4 module. For the XBee ZNet 2.5 ("Series 2") modules, see this configuration guide.

A Simple Example

You should be able to get two Arduino boards with Xbee shields talking to each other without any configuration, using just the standard Arduino serial commands (described in the reference).

To upload a sketch to an Arduino board with a Xbee shield, you'll need to put both jumpers on the shield to the "USB" setting (i.e. place them on the two pins closest to the edge of the board) or remove them completely (but be sure not to lose them!). Then, you can upload a sketch normally from the Arduino environment. In this case, upload the Communication | Physical Pixel sketch to one of the boards. This sketch instructs the board to turn on the LED attached to pin 13 whenever it receives an 'H' over its serial connection, and turn the LED off when it gets an 'L'. You can test it by connecting to the board with the Arduino serial monitor (be sure it's set at 9600 baud), typing an H, and pressing enter (or clicking send). The LED should turn on. Send an L and the LED should turn off. If nothing happens, you may have an Arduino board that doesn't have a built-in LED on pin 13 (see the board index to check for sure), in this case you'll need to supply your own.

Once you've uploaded the Physical Pixel sketch and made sure that it's working, unplug the first Arduino board from the computer. Switch the jumpers to the Xbee setting (i.e. place each on the center pin and the pin farthest from the edge of the board). Now, you need to upload a sketch to the other board. Make sure its jumpers are in the USB setting. Then upload the following sketch to the board:

to:

El XBee shield para Arduino permite comunicar tu Arduino de forma inalámbrica usando ZigBee. Fue desarrollado in colaboración con Libelium. Esta documentación describe el uso del shield con los módulos XBee 802.15.4. Para los módulos XBee ZNet 2.5 ("Series 2") revisa esta guia de configuración.

Un ejemplo sencillo

Deberías tener dos placas Arduino con XBee shield comunicándose una con la otra sin configurar nada, usando sólo los comandos estandard de Arduino (descritos en reference).

Para cargar un programa a la placa Arduino con XBee shield, necesitarás poner los dos jumpers del shield en la posición USB (coloca los dos jumpers en la parte cercana al borde de la placa) o quítalos completamente (asegurate de no perderlos!). Luego, ya puedes cargar un programa con normalidad desde el Arduino IDE. En este caso, carga el programa Communication | Physical Pixel a una de las placas. Este programa manda a la placa encender el LED conectado al pin 13 cuando recibe 'H' por el puerto serie y lo apaga cuando recibe 'L'. You can probarlo conectando la placa con el monitor de puerto serie de Arduino (asegurate de configurarlo a 9600 baudios), escribiendo H y INTRO (o pinchando en "send") el LED debería encenderse. Envía L y el LED debería apagarse. Si no ocurre nada, es posible que tengas un Arduino que no tiene el LED conectado al pin 13 montado en la placa (mira aquí board index para asegurarte), en este caso tendrás que conectar tu propio led.

Una vez que has cargado el programa Physical Pixel y comprobado que funciona, desconecta el primer Arduino del ordenador. Conecta los jumpers en la posicion XBee (en la posición más alejada del borde de la placa). Ahora, necesitas cargar otro programa a la otra placa. Asegúrate de que sus jumpers estan en la posición USB. Luego carga el siguiente programa a la placa:

August 15, 2009, at 01:51 PM by David A. Mellis -
Changed lines 1-4 from:

Arduino Xbee Shield

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium.

to:

Arduino XBee Shield

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium. This documentation describes the use of the shield with the XBee 802.15.4 module. For the XBee ZNet 2.5 ("Series 2") modules, see this configuration guide.

August 16, 2007, at 12:47 AM by David A. Mellis -
Changed lines 3-4 from:

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium, a spin-off from the University of Zaragoza in Spain.

to:

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium.

August 16, 2007, at 12:42 AM by David A. Mellis -
Changed lines 3-4 from:

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee.

to:

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium, a spin-off from the University of Zaragoza in Spain.

August 16, 2007, at 12:41 AM by David A. Mellis -
Changed lines 97-101 from:

Note that like the other commands, the reset will not be permanent unless you follow it with the ATWR comamand.

to:

Note that like the other commands, the reset will not be permanent unless you follow it with the ATWR comamand.

References

For more information, see: the hardware page for the Xbee shield, the Libelium SquidBee wiki, and the MaxStream Xbee page.

August 15, 2007, at 09:12 PM by David A. Mellis -
Changed lines 52-53 from:

Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with):

to:

Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with), use the 'ATID command:

Changed lines 79-80 from:

Unless you tell the module to write the changes to non-volatile (long-term) memory, they will only be in effect until the module loses power. To save the changes permanently (until you explicitly modify them again):

to:

Unless you tell the module to write the changes to non-volatile (long-term) memory, they will only be in effect until the module loses power. To save the changes permanently (until you explicitly modify them again), use the ATWR command:

Changed lines 88-97 from:
to:
August 15, 2007, at 09:02 PM by David A. Mellis -
Changed lines 43-44 from:

To get the module into configuration mode, you need to send it three plus signs: +++ and there needs to be at least a second before and after when you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.

to:

To get the module into configuration mode, you need to send it three plus signs: +++ and there needs to be at least one second before and after during which you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.

August 15, 2007, at 09:02 PM by David A. Mellis -
Changed lines 43-44 from:

To get the module into configuration mode, you need to send it three plus signs: + and there needs to be at least a second before and after when you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.

to:

To get the module into configuration mode, you need to send it three plus signs: +++ and there needs to be at least a second before and after when you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.

August 15, 2007, at 09:01 PM by David A. Mellis -
Changed lines 39-40 from:

Configuration the Xbee Module

to:

Configuring the Xbee Module

August 15, 2007, at 09:00 PM by David A. Mellis -
Added lines 78-88:
August 15, 2007, at 08:58 PM by David A. Mellis -
Changed line 45 from:
to:
Changed line 54 from:
to:
Changed line 63 from:
to:
Changed line 72 from:
to:
August 15, 2007, at 08:57 PM by David A. Mellis -
Changed line 49 from:
to:
Changed lines 54-57 from:
Send CommandExpected Response
ATID<enter>3332
to:
Changed lines 63-66 from:
Send CommandExpected Response
ATID3331<enter>OK
to:
Changed lines 72-75 from:
Send CommandExpected Response
ATID<enter>3331
to:
August 15, 2007, at 08:56 PM by David A. Mellis -
Changed lines 46-53 from:
to:
August 15, 2007, at 08:55 PM by David A. Mellis -
Added lines 45-57:
Deleted lines 59-64:
+++OK

Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with):

Send CommandExpected Response
August 15, 2007, at 08:54 PM by David A. Mellis -
Added line 45:
Added line 51:
Added line 57:
Added line 63:
August 15, 2007, at 08:53 PM by David A. Mellis -
Changed lines 45-47 from:
Send CommandExpected Response
+++OK
to:
Send CommandExpected Response
+++OK
Changed lines 50-52 from:
Send CommandExpected Response
ATID<enter>3332
to:
Send CommandExpected Response
ATID<enter>3332
Changed lines 55-57 from:
Send CommandExpected Response
ATID3331<enter>OK
to:
Send CommandExpected Response
ATID3331<enter>OK
Changed lines 60-62 from:
Send CommandExpected Response
ATID<enter>3331
to:
Send CommandExpected Response
ATID<enter>3331
August 15, 2007, at 08:49 PM by David A. Mellis -
Changed line 45 from:
Command SentResponse Received
to:
Send CommandExpected Response
Changed lines 48-73 from:

Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with), go into command mode and then type:

ATID

followed by a carriage return (i.e. pressing enter from within a terminal program). You should see:

3332

(the default ID of the module) or whatever value the ID was last set to.

To change the network ID of the module, type:

ATID3331

and press enter. You should get back:

OK

Now, check that the setting has taken effect by again asking for the ID:

ATID

(and pressing enter). You should see:

3331

to:

Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with):

Send CommandExpected Response
ATID<enter>3332

To change the network ID of the module:

Send CommandExpected Response
ATID3331<enter>OK

Now, check that the setting has taken effect:

Send CommandExpected Response
ATID<enter>3331
August 15, 2007, at 08:47 PM by David A. Mellis -
Changed lines 46-47 from:
+++OK@@
to:
+++OK
August 15, 2007, at 08:47 PM by David A. Mellis -
Changed lines 43-46 from:

To get the module into configuration mode, you need to send it three plus signs: + and there needs to be at least a second before and after when you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return. In a terminal, this will look like this (where the +++ was typed by you, and the OK returned by the module):

+++OK

to:

To get the module into configuration mode, you need to send it three plus signs: + and there needs to be at least a second before and after when you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.

Command SentResponse Received
+++OK@@
August 15, 2007, at 08:45 PM by David A. Mellis -
Changed lines 41-42 from:

You can configure the Xbee module from the code running on the Arduino board or from software on the computer. To configure it from the Arduino board, you'll need to have the jumpers in the Xbee position. To configure it from the computer, you'll need to have the jumpers in the USB configuration and have removed the microncontroller from your Arduino board.

to:

You can configure the Xbee module from code running on the Arduino board or from software on the computer. To configure it from the Arduino board, you'll need to have the jumpers in the Xbee position. To configure it from the computer, you'll need to have the jumpers in the USB configuration and have removed the microncontroller from your Arduino board.

August 15, 2007, at 08:44 PM by David A. Mellis -
Changed lines 37-72 from:

To allow your computer to communicate directly with the Xbee shield, connect it to an Arduino board whose microcontroller has been removed and place its jumpers in the USB configuration. Then you can send data to and receive data from the Xbee module from any terminal program. This allows you, for example, to see the data that the module is receiving from other Xbee shields (e.g. to collect sensor data wirelessly from a number of locations).

to:

To allow your computer to communicate directly with the Xbee shield, connect it to an Arduino board whose microcontroller has been removed and place its jumpers in the USB configuration. Then you can send data to and receive data from the Xbee module from any terminal program. This allows you, for example, to see the data that the module is receiving from other Xbee shields (e.g. to collect sensor data wirelessly from a number of locations).

Configuration the Xbee Module

You can configure the Xbee module from the code running on the Arduino board or from software on the computer. To configure it from the Arduino board, you'll need to have the jumpers in the Xbee position. To configure it from the computer, you'll need to have the jumpers in the USB configuration and have removed the microncontroller from your Arduino board.

To get the module into configuration mode, you need to send it three plus signs: + and there needs to be at least a second before and after when you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return. In a terminal, this will look like this (where the +++ was typed by you, and the OK returned by the module):

+++OK

Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with), go into command mode and then type:

ATID

followed by a carriage return (i.e. pressing enter from within a terminal program). You should see:

3332

(the default ID of the module) or whatever value the ID was last set to.

To change the network ID of the module, type:

ATID3331

and press enter. You should get back:

OK

Now, check that the setting has taken effect by again asking for the ID:

ATID

(and pressing enter). You should see:

3331

August 13, 2007, at 02:05 AM by David A. Mellis -
Changed line 37 from:

To allow your computer to communicate directly with the Xbee shield, connect it to an Arduino board whose microcontroller has been removed and place its jumpers in the USB configuration. Then you can send data to and receive data from the Xbee module from any terminal program.

to:

To allow your computer to communicate directly with the Xbee shield, connect it to an Arduino board whose microcontroller has been removed and place its jumpers in the USB configuration. Then you can send data to and receive data from the Xbee module from any terminal program. This allows you, for example, to see the data that the module is receiving from other Xbee shields (e.g. to collect sensor data wirelessly from a number of locations).

August 13, 2007, at 01:59 AM by David A. Mellis -
Changed lines 33-34 from:

You can use any of the standard Arduino serial commands with the Xbee shield. With the shield's jumpers in the Xbee position, the print and println commands will send data over the Xbee shield and the USB connection (i.e. to other Xbee shields and to the computer at the same time). The Xbee module on the shield, however, is set up to work at 9600 baud by default, so unless you reconfigure it, you'll need to make sure you're passing 9600 to the Serial.begin() command in your sketch.

to:

You can use any of the standard Arduino serial commands with the Xbee shield. With the shield's jumpers in the Xbee position, the print and println commands will send data over the Xbee shield and the USB connection (i.e. to other Xbee shields and to the computer at the same time). In this configuration, however, the board will only receive data from the Xbee shield not from the USB connection (you'll need to switch the jumpers to allow the board to receive data from the computer).

The Xbee module on the shield is set up to work at 9600 baud by default, so unless you reconfigure it, you'll need to make sure you're passing 9600 to the Serial.begin() command in your sketch.

August 13, 2007, at 01:54 AM by David A. Mellis -
Changed line 35 from:
to:

To allow your computer to communicate directly with the Xbee shield, connect it to an Arduino board whose microcontroller has been removed and place its jumpers in the USB configuration. Then you can send data to and receive data from the Xbee module from any terminal program.

August 13, 2007, at 01:40 AM by David A. Mellis -
Added lines 31-35:

A Few Notes

You can use any of the standard Arduino serial commands with the Xbee shield. With the shield's jumpers in the Xbee position, the print and println commands will send data over the Xbee shield and the USB connection (i.e. to other Xbee shields and to the computer at the same time). The Xbee module on the shield, however, is set up to work at 9600 baud by default, so unless you reconfigure it, you'll need to make sure you're passing 9600 to the Serial.begin() command in your sketch.

August 13, 2007, at 01:32 AM by David A. Mellis -
Changed lines 28-30 from:

When it's finished uploading, you can check that it's working with the Arduino serial monitor. You should see H's and L's arriving one a second. Turn off the serial monitor and unplug the board. Switch the jumpers to the Xbee setting. Now connect both boards to the computer. After a few seconds, you should see the LED on the first board turn on and off, once a second. (This is the LED on the Arduino board itself, not the one on the Xbee shield, which conveys information about the state of the Xbee module.) If so, congratulations, your Arduino boards are communicating wirelessly.

to:

When it's finished uploading, you can check that it's working with the Arduino serial monitor. You should see H's and L's arriving one a second. Turn off the serial monitor and unplug the board. Switch the jumpers to the Xbee setting. Now connect both boards to the computer. After a few seconds, you should see the LED on the first board turn on and off, once a second. (This is the LED on the Arduino board itself, not the one on the Xbee shield, which conveys information about the state of the Xbee module.) If so, congratulations, your Arduino boards are communicating wirelessly. This may not seem that exciting when both boards are connected to the same computer, but if you connect them to different computers (or power them with an external power supply - being sure to switch the power jumper on the Arduino board), they should still be able to communicate.

August 13, 2007, at 01:30 AM by David A. Mellis -
Added lines 1-28:

Arduino Xbee Shield

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee.

A Simple Example

You should be able to get two Arduino boards with Xbee shields talking to each other without any configuration, using just the standard Arduino serial commands (described in the reference).

To upload a sketch to an Arduino board with a Xbee shield, you'll need to put both jumpers on the shield to the "USB" setting (i.e. place them on the two pins closest to the edge of the board) or remove them completely (but be sure not to lose them!). Then, you can upload a sketch normally from the Arduino environment. In this case, upload the Communication | Physical Pixel sketch to one of the boards. This sketch instructs the board to turn on the LED attached to pin 13 whenever it receives an 'H' over its serial connection, and turn the LED off when it gets an 'L'. You can test it by connecting to the board with the Arduino serial monitor (be sure it's set at 9600 baud), typing an H, and pressing enter (or clicking send). The LED should turn on. Send an L and the LED should turn off. If nothing happens, you may have an Arduino board that doesn't have a built-in LED on pin 13 (see the board index to check for sure), in this case you'll need to supply your own.

Once you've uploaded the Physical Pixel sketch and made sure that it's working, unplug the first Arduino board from the computer. Switch the jumpers to the Xbee setting (i.e. place each on the center pin and the pin farthest from the edge of the board). Now, you need to upload a sketch to the other board. Make sure its jumpers are in the USB setting. Then upload the following sketch to the board:

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  Serial.print('H');
  delay(1000);
  Serial.print('L');
  delay(1000);
}

When it's finished uploading, you can check that it's working with the Arduino serial monitor. You should see H's and L's arriving one a second. Turn off the serial monitor and unplug the board. Switch the jumpers to the Xbee setting. Now connect both boards to the computer. After a few seconds, you should see the LED on the first board turn on and off, once a second. (This is the LED on the Arduino board itself, not the one on the Xbee shield, which conveys information about the state of the Xbee module.) If so, congratulations, your Arduino boards are communicating wirelessly.

Share