Shop OBEX P1 Docs P2 Docs Learn Events
Using BS2 With XBee Pro 60mW Chip Antenna — Parallax Forums

Using BS2 With XBee Pro 60mW Chip Antenna

kenwtnkenwtn Posts: 250
edited 2008-06-04 17:43 in BASIC Stamp
Hi All,

··· I understand this is asking alot, but worth a shot. I m thinking of buying the XBee Pro 60mW Chip Antenna but before I put out the cash I would like to know more about programning for it. The link to the XBee is: http://www.sparkfun.com/commerce/product_info.php?products_id=8690·If anyone has used the XBee and has some sample code they could show me I would very appreciative? I have an application where I m using a Master Slave and wish to send and receive infomation between the two BS2 I have.

Thanks In Advance.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-04 01:42
    The xBee just provides a bidirectional serial port, just like a cable. If you have some kind of USB adapter for your PC for the other end of the xBee connection, you can configure both units with their utility program (from digi.com). Once the units are configured, you would just use SERIN and SEROUT on the Stamp end and some kind of serial I/O based program on the PC end. There's no special programming on the Stamp end that is specific to the xBee if the xBee device is pre-configured. Even if you had to configure the xBee device with the Stamp, you'd still use the SERIN and SEROUT statements to do it.
  • kenwtnkenwtn Posts: 250
    edited 2008-06-04 01:47
    Mike Thanks for the quick reply. I guess I spend the money and go for it. I contacted Sparkfun and they recommend an additional board that connects directly to the serial port of my computer. Thank again.

    For anyone interested the board sparkfun recommended is here: http://www.sparkfun.com/commerce/product_info.php?products_id=449

    Post Edited (kenwtn) : 6/4/2008 2:07:00 AM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-04 02:00
    I made my own adapter from a USB to serial adapter sold by FTDI. SparkFun's looks nice, but they didn't have it earlier. My BoeBot now uses a Propeller Protoboard rather than a BOE, but I did use a standard BOE at first with the xBee ... worked nicely.
  • kenwtnkenwtn Posts: 250
    edited 2008-06-04 02:06
    I just completed the order and will have it in 2 days. I will let you know how it goes. Thanks Again Mike your a great person to get information from.
  • FranklinFranklin Posts: 4,747
    edited 2008-06-04 03:00
    Mike, are you sure that's not a PROPBOT? [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-06-04 07:01
    There are lots of good code examples here:

    http://www.selmaware.com/appbee/home.htm

    I used his boards as well. Note that the XBees can be used right out of the box, without having to configure them, though configuring is quite easy. You can configure them directly from your Stamp program - his code examples show how.
  • stampedstamped Posts: 68
    edited 2008-06-04 10:32
    I have been playing around with XBees the last couple of weeks. I got sick of cables and dev boards (I have the XBee Development Kit), so I have ordered one of the following (compact USB XBee carrier);

    http://www.newmicros.com/index2.php?url=http%3A%2F%2Fwww.newmicros.com%2Fcgi-bin%2Fstore%2Forder.cgi%3Fform%3Dprod_detail%26part%3DUSB-XBEE-DONGLE-CARRIER

    I am excited about this board (waiting on it to arrive in the post!) as it removes the need for external cords and extra carrier boards, I can just plug the XBee straight into my USB port.
  • kenwtnkenwtn Posts: 250
    edited 2008-06-04 13:13
    Do the XBee's do all the work and you simple talk to them through the Serial Port?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-04 14:21
    Yes. Once you set them up, they do all the work and you simply talk to them through the serial port. They have to be configured so that they each have a numeric address and that each has the address of the other unit that it will talk to. This can be done with a utility program that you can download from the manufacturer or with any terminal program.

    Note that there are Series 1 and Series 2 devices. The Series 1 devices default to Transparent Mode which makes the two devices work as a transparent wireless serial link. The Series 2 devices have different sets of firmware, one for Transparent Mode and one for complex networking called API mode. Read the manual for details.
  • kenwtnkenwtn Posts: 250
    edited 2008-06-04 14:30
    I ordered two XBee 2mW Series 2.5 Wire Antenna. So is that a good or bad thing? Once they are configure do you have to reconfigure each time you use it or does it retain the infomation?

    Post Edited (kenwtn) : 6/4/2008 2:43:25 PM GMT
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-06-04 17:43
    They retain the information, if you explicitly write it to the module's nonvolatile memory. From the manual (list of commands):

    Write[font=Arial Narrow,Arial Narrow]. Write parameter values to non-volatile memory so that parameter modifications persist through subsequent resets. Note: Once WR is issued, no additional characters should be sent to the module until after the "OK\r" response is received. The WR command should be used sparingly. The EM250 supports a limited number of write cycles."

    [/font]
Sign In or Register to comment.