Shop OBEX P1 Docs P2 Docs Learn Events
Configuring AppBee through BS1 Project Board — Parallax Forums

Configuring AppBee through BS1 Project Board

Chris CChris C Posts: 50
edited 2008-03-21 20:04 in BASIC Stamp
I tried the following code after reading through the AppBee documentation, but I'm not sure if it programmed correctly.· I don't have the USB2SER, kinda wish I ordered it now that I see how much work it takes to do it through the Stamp1.

SYMBOL myAddr = $1 ' Node Address in hex

SYMBOL DestAddr = $0 ' Destination address in hex

SYMBOL RX = 0 ' Receive Pin
SYMBOL TX = 2 ' Transmit Pin
SYMBOL RTS = 6 ' Flow control Pin
HIGH TX ' Place TX pin High (Idle state)
DEBUG CLS, "Configuring XBee..."
PAUSE 2000 ' Guard time for command sequence
SEROUT TX, T2400, ("+++") ' Enter command mode
PAUSE 2000 ' Guard time for command sequence
SEROUT TX, T2400, ("ATNI BS1 Test Node") ' Set description
DEBUG CR
SEROUT TX, T2400, ("ATMY ", myAddr) ' Set node address
DEBUG CR
SEROUT TX, T2400, ("ATDL ", DestAddr) ' Set destination address
DEBUG CR
SEROUT TX, T2400, ("ATD6 1") ' Use RTS for flow control
DEBUG CR
SEROUT TX, T2400, ("ATCN") ' Exit command mode
DEBUG CR
PAUSE 1000
DEBUG "Configuration Complete!", CR

REPEATS: ' Send message forever at 1S intervals
SEROUT TX, T2400,("Hello Node!")
DEBUG CR
PAUSE 1000
GOTO REPEATS

Would this set the configuration right?· Thanks in advance.

Comments

Sign In or Register to comment.