Configuring AppBee through BS1 Project Board
Chris C
Posts: 50
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.
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
Any help is appreciated.
Until you can communicate directly to the XBee using the X-CTU software or PC terminal to change the ATBD value, you won't be able to talk to it.
Through a Terminal window you could send a:
ATBD 1······· to change the baud rate to 2400
ATWR········ to write the changes to EEPROM
OR, use X-CTU to select the value of BD and write to update.
But, you need some other comms to the XBee to do this.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
SelmaWare Solutions - StampPlot GUI for controllers, XBee and Propeller Application Boards
Southern Illinois University Carbondale, Electronic Systems Technologies
American Technical Educator's Assoc. Conference·- April, Biloxi, MS. -- PROPELLER WORKSHOP!
Sorry, until you can talk to it, you won't be able to talk to it!· What a catch 22, huh?
-Martin
Thanks!
Is this the right part?
-Martin
Could I use the PropClip in that case?
http://www.parallax.com/Store/Microcontrollers/PropellerTools/tabid/143/List/1/ProductID/397/Default.aspx?SortField=ProductName%2cProductName
If so, I can order it!
Thanks.
-martin