StampPlot interface to control up to 3 Boe-Bots at once
using XBee RF Transceivers.
Developed in conjunction with the Electronic Systems
Technologies student organization
at Southern Illinois University Carbondale
www.siu.edu/~isat/est


Equipment:
1 - 3 Boe-bots with XBee RF transceivers
1 XBee with USB or Serial base for PC control
StampPlot Version 3.75 or higher with interface
macro
The BS2 Code for the bots.
Use and Explanations:
1) Download code to the Boe-Bots. Each bot must have a unique
address, 1-3, set by the code
myAddr CON $1
' Node Address ******* change for each ********
2) Connect XBee Base to PC. Select Port, Connect, and
initialize.
This will configure the base for very low AT command guard times (ATGT) allowing
quick updating of destination addresses by controls. The base should be
set for an address of 0 (ATMY). This can be done through the configuration
options.
3) Ready to roll! Power up the bots.
Each bot will configure their XBee's to set the addresses, RTS (ATD6) so data is
buffered, and packetization timeout (ATRO) to ensure data sent is kept within a
single packet to prevent text from 2 bots mixing.
PAUSE 2000
' Guard time for command sequence
SEROUT TX,Baud,["+++"]
' Enter command mode
PAUSE 2000
' Guard time for command sequence
SEROUT TX,Baud,["ATMY ", HEX myAddr,CR,
' Set node address
"ATDL ", HEX DestAddr,CR,
' Set destination node address
"ATD6 1",CR,
' Use RTS for flow control
"ATRO 50",CR,
' Increase packet timeout to keep data together
"ATCN",CR]
' Exit command mode
4) Each bot can be individually controlled, placed in auto, or
controlled as a group.
For an example, when Bot #1 is sent a Forward command, the following takes place
by the button code:
- The base XBee has the destination address updated in command mode (ATDL)
- An operation code is sent to that bot (F for forward).
' guard time
!WAIT 0.1
' command mode
!SRAW +++
'gaurd time
!WAIT 0.1
' send address to communicate, exit command mode
!SEND ATDL 1,CN
!WAIT 0.1
!SEND F
5) All bots can be controlled at once. The destination address
(ATDL) is set to FFFF for a broadcast address.
6) When a bot sends data, it send its address, text. The
address is captured by StampPlot and used to update the correct bot's box and
indicating light.
' Update correct box
!POBJ lstData(AINVAL0).add= Bot(AINVAL0) says: (AINVAL1)
' Turn on indicator
!POBJ rx(AINVAL0)=1
' Turn on timer to turn off light
!POBJ oTimer0=0.1
7) In auto mode, the code uses IR's for roaming.
