Shop OBEX P1 Docs P2 Docs Learn Events
xbee programming help — Parallax Forums

xbee programming help

AnnoyingAnnoying Posts: 50
edited 2010-03-30 19:11 in BASIC Stamp
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
DO
· SERIN RX, 84, [noparse][[/noparse]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
LOOP····

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?
Thanks!

Comments

Sign In or Register to comment.