View Full Version : xbee programming help

03-30-2010, 10:46 AM
So I just got two xbees and an·adapter that regulates the 5 V supply from the BS2 to 3.3 V, and now I am confused about how to program it. I·have questions about·the sample code on the parallax 5 V/3.3 adapter:

RX········ PIN·· 6························· ' XBee DOUT pin
PbState··· VAR·· Bit························ ' Variable space for pushbutton state
· SERIN RX, 84, [BIN PbState]··············· ' Receives pushbutton state
· DEBUG HOME, ? PbState····················· ' Displays state in Debug Terminal
· IF PbState = 1 THEN HIGH 13 ELSE LOW 13··· ' LED on if pressed/off if not pressed

I am trying to transmit accelerometer data and I thought I could just modify this code and it would work, but that's not the case.
What is the BIN command for, is it always necessary? I am completely new to this. Is PbState always the·parameter in the SERIN command? Is there any "configuration" I need to do?

03-30-2010, 04:35 PM
All of your questions will be answered right here:


Work your way through the code examples in this document, and you'll be an XBee Pro.

03-31-2010, 02:11 AM
thank you, that looks really helpful! so hard to find...