Xbee can be connected directly like an invisible wire. You can set the matching pins as one of them as input (AI/DI) and the other as output (PO/DO).
You can see this application in Wireless Tilt Sensing Bracelet,
To do this, you need to change some AT command. To access AT command, connect Xbee with computer with dongle, if you are using PC, you can use X-CTU to program it. If you are using Mac, you can use XBee Terminal Max by Rob Faludi, or make your own serial terminal communicator with your favorite program. Here is a small max patch we use made by Ingo Randolf. You can use it with max/msp runtime (free) if you do not have max license.
Here is an example AT command setup.
[TABLE=5]
The example is based on the I/O Line Passing example on the Xbee series 1 manual p14.
I/O lines are mapped in pairs. D0 input is connected to D0 output on the paired module. To enable the outputs to be updated, the IA (I/O Input Address) parameter must be setup with the address of the module. This effectively binds the outputs to a particular module’s input. The IU command enables I/O UART output. When enabled (IU = 1), received I/O line data packets are sent out the UART.
Actually the communication can be bidirectional, meaning both side can have both input pin and output pin.
Here is an example setup. In this case, Xbee-A has D0 pin as input and D3 pin as output, and XBee-B has D0 pin as output and D3 pin as input. I first tried with D0 and D1 pin, but it did not work. It can be because the pins are too close (or maybe I had a bad connection on my breadboard…).
Anyway, here is the setup table. I hope this info helps your little tinkering..
And one important thing. The direct mode is only supported on Xbee series1. also, this this requires Firmware Version : v1.x80 (minimum). If you have very old Xbee series1, you need to do firmware update.
XbeeA
ATID>> 1234
ATMY>> 5656
ATDL>> 7878
ATAI>> 0
ATIR>> 14
ATIT>> 5
ATBD>> 3
ATIU>> 1
ATIA>> 7878
ATD0>> 3
ATD1>> 0
ATD2>> 0
ATD3>> 4
XbeeB
ATID>> 1234
ATMY>> 7878
ATDL>> 5656
ATAI>> 0
ATIR>> 14
ATIT>> 5
ATBD>> 3
ATIU>> 1
ATIA>> 5656
ATD0>> 4
ATD1>> 0
ATD2>> 0
ATD3>> 3
Is it possible to do i/o line passing (like in your wireless tilt braclet example) with the seris 2 xbee modules? All I need my xbees to do is send the voltage change from some analog sensors (In pin D0 at the remote site OUT pin D0 at the base. I have all the interface set up to interpret the voltage, I just want to make it wireless!!!). Do you have any insght? From looking around the web, it seems that I may have to buy the series 1 modules.
From what I read and tried, you can *not* do line passing with series 2. I bought a couple series 1 and I’m trying to get it working now. Series 2 doesn’t even give you the option to configure line passing commands.
Is it possible to do line passing with one base and two or three remotes (to control multiple lights with one switch for example…) ?
I’m tinking about broadcasting…
I didn’t find the answer in the digi’s datasheet…
thanks!
Line passing and series 2 (ZNET 2.5 COORDINATOR AT version 1047) :
I/O Settings -> I/O Sampling -> IC – Digital IO Change Detection
Bitfield that configures which digital IO pins should be monitored for change detection. If a change is detected on an enabled digital IO pin, a digital IO sample is immediately transmitted to the address specified by DH DL.
RANGE:0-0XFFFF
You also need to enable digital pin for input.
hi,
i would like to control an LED using xbee series 1.
the LED is connected to pin 20 D0 on the end device module which is powered via a 3.3V battery whereas the coordinator is connected to my pc.
the actual code am using through X-CTU is like this :
ATD04
ATCN
thats really working but am guessing that its wrong as both the coordinator and the end device pin 20 D0 react the same.
Can someone please help me out?
thanks
Anyone know how to communicate Xbee to Xbee on a Makey Makey?
What Im trying to do is make a wireless mouse/keyboard by using a makey makey but would rather be wireless. So, I would act as ground and my wireless mouse/device will have the transmitting xbee and the receiving xbee would be attached to makey makey and hopefully work like a invisible wire and therefore closing the loop?
I pay a quick visit each day some sites and blogs to read
articles or reviews, however this website gives quality based posts.