main
hserout2 “Hello World”,13]
hserin2 [temp]
toggle p44 ; to see status led activity
goto main[/code]
After studio update 2.0.0.0
[code]
sethserial2 H38400
temp var byte
main
hserout 2, “Hello World”,13]
hserin 2, [temp]
toggle p44 ; to see status led activity
goto main[/code]
To get this to work i need to set “MY” back to “0” on my XBee module. Could someone tell me if this is normal?
Not sure what you mean to make this work? What are you talking to on the other side? That is the hserout 2, … will simply output the text to the xbee. Now assuming you are in default line replacement mode and not packet mode, it will simply send the text out to whatever XBee if any that has the My= to the DL that you are sending to. Your HSERIN will simply receive stuff if there is someone on the other side who is sending data to whatever your MY is set to.
That is: To have two XBees talk to each other, you need to have something like:
XBee1
atmy=1
atdl =2
XBee2
atmy=2
atdl=1
or to confuse matters you can also use full 64 bit addressing: that is you can set:
atdh= <high 32 bits of the destination>
atdl= <low 32 bits of the destination>
This is good when you want to really make sure which xbee you are going to talk to…
Hi Kurt,
I was just trying to use the ARC32 and 2 xbees. Just prints HELLO WORLD and toggles the led when a key is pressed.
XBee Explorer USB connected to the PC
XBee 1
MY = 0
NI = MYBOT1
BD = 38400
XBee Explorer Regulated connected to the 2nd UART Pins on the ARC32
XBee 2
MY = 0
NI = MYBOT2
BD = 38400
These are the only changes i made to the defaults
works fine but if I change the MY (ie. XBee1 MY=15 band XBee2 MY=17) it stops working.