Wireless Lilypad Xbee programming

Hello Everyone,

I’m fairly new to programming with the Arduino; my primary experiences with it have been making programs for lights and buttons, not to mention copying and pasting code all of the time. That being said, I knew that I wouldn’t get through the “Wireless Arduino Programming” tutorial without a hitch or two. I’ve looked through the forums for assistance, and I don’t think it helped me very much. I haven’t tried Rob Faludi’s technique yet, (I’d prefer not to; it looks even tougher) but I have looks through the guide on this website

http://www.sparkfun.com/tutorials/122#Step1

and the Ladyada guide

http://www.ladyada.net/make/xbee/arduino.html

One issue that worries me is that when I searched through the ladyada forums, a lot of people were using the Duemilanove/Diecimila and the adapter kit… I’m not really using any of that. My goal is to program the Lilypad arduino with the Lilypad xbee breakout board: http://lilypadxbee.katehartman.com/about-board/

My materials for this are not exactly conventional. My project mentor purchased materials for me with the limited knowledge that he had of the arduino devices. He decided to purchase the series 2 (I think) Xbee PRO devices (which may not be necessary), and I only have one FTDI device:

http://www.sparkfun.com/search/results? … t=products

(Luckily I was able to connect the Xbees with that instead of the typical Xbee explorer.)

Luckily I had an arduino uno myself, so I was able to use that to connect to the other Xbee device.

I look a couple of pictures to show how completely prepared I am.

https://lh4.googleusercontent.com/-zp4Y … 1106_1.JPG

https://lh6.googleusercontent.com/-humO … 1106_2.JPG

Up until this point, I was able to configure both of the Xbees with X-CTU, and I was able to write (copy/paste) a simple program to test and make sure they could communicate with each other. I was able to get them to communicate, but re-programming the Arduino will take a lot more effort. I followed the guide on this website, I made my baud rate 57600 (since Lilypads use the 328 chip), and I used the XB24P setting for the Xbee pros. Instead of any actual soldering, I just connected RTS with DI3 (the white clips next to each other; look at the xbee link I posted earlier for an explanation). My capacitor / transistor are somewhat old, but that doesn’t seem to be the issue.

I was able to access AVRdude and upload a blinking program to the arduino directly, but not through the Xbee device. The receiving Xbee’s RSSI light is constantly on ever since X-CTU reconfigured it. When I tried to use AVRdude to connect to the port with the transmitting Xbee, I got the classic “0x51” (not detected) response. In AVRdude, I typed out the string:

“avrdude –c stk500v1 –v 57600 -P COM4 -p m328p -u -U flash:w:blinktest.hex”

Apparently AVRdude didn’t detect the Xbee.

I then found the Sparkfun guide and tried to use Screamer. The zip file on the tutorial was missing another .ocx file, so I downloaded the Screamer v2.6 program that I found here:

http://homewireless.org/wp/2010/04/wire … funnel-io/

I tried to download the same hex file, but it didn’t work.

My guess is that there’s something wrong with the way the software is sending data to the xbee, but my knowledge of the software is obviously lacking. I’m also concerned that my inappropriate setup might be the issue; I’m not using any of the same components that were in the tutorial, and that could be an issue. If anyone has any advice, please let me know. Thank you.

have you confirmed that the xbee’s are able to talk to one another? I have series 2, and I am new to all this, so it was a little tricky to get them communicating at first.

if you are only using two xbees, did you designate one as “coordinator” and the other as “end device” under function set in X-CTU? make sure you have the latest version also. I assume you installed a reset switch, which you will need to make changes in x-ctu.

Then make sure you follow the input values according to this:

http://arduino.cc/en/Main/ArduinoBoardFioProgramming

under “preparing the xbee radios”. Main things are that the BD is matching, PAN ID is matching, D3 for coord (cpu) is 3 and for end device(arduino) is 5.

Once you have these, you can test if they can speak to each other using the range test. you may have to physically connect the RX/TX terminals on the end device xbee.

Once you know they can talk to each other, use the arduino program (the one you use to write the code) and use the upload function. If your USB is set to the FTDI-Xbee(coord) it should work. I’m using fio, but it may be needed for you: I have to manually press the reset button the arduino just as the sketch size is determined in the program, to make sure I can send the sketch.