Hi
I found a very good code for RF module. It is simple but very robust. If you are interested, see the link below:
http://www.glacialwanderer.com/hobbyrobotics/?p=291
Now I tried to use this code with my XBee 2 series and it doesn't work. I know that setting of the Xbee are correct because when I use different simple code , it works. So basically, no XBee setting problem at all.
Anybody have any idea why this code doesn't work with XBee 2 and any solution? Will it work with XBee 1(that I don't have)?
I wanted to use XBee for my project but the code I know is not stable. Project is simple to control the LED at the other side. The code in the "Wireless Sensor Networks" and "Arduino Cookbook" are simple and not stable. Anybody have more robust code to control a LED like the one shown in the link.
Thanks
Good Code for XBee?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23940
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Good Code for XBee?
You need to modify the code to use xbee. You also need to configure the modules, have you done that? The Adafruit series1 modules are different than the series2 so code found here might not work in your case.
-
- Posts: 38
- Joined: Tue May 08, 2012 9:16 am
Re: Good Code for XBee?
Thanks franklin for your comments.
As I said earlier, I have configure the module and it is correct that it works with different code.
To modify the code to use xbee, I cannot find the code to modify based on my knowledge. Because both module (RF & xbee) do not need any library and use serial port to transmit/receive data.
When I use simple code to test, both are working. But not this code.
If anybody found the solution, please let me know.
Thanks
As I said earlier, I have configure the module and it is correct that it works with different code.
To modify the code to use xbee, I cannot find the code to modify based on my knowledge. Because both module (RF & xbee) do not need any library and use serial port to transmit/receive data.
When I use simple code to test, both are working. But not this code.
If anybody found the solution, please let me know.
Thanks
- Franklin97355
- Posts: 23940
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Good Code for XBee?
What is not robust about the code you have tried?Anybody have more robust code to control a LED
-
- Posts: 38
- Joined: Tue May 08, 2012 9:16 am
Re: Good Code for XBee?
franklin
The code I have tried is simple and works. those are from the book I mentioned earlier.
However transmitted data lost in transit sometime. Therefore data exchange is not reliable.
But the code in the link is relatively more reliable. Unfortunately it doesn't work with xbee 2.
The code I have tried is simple and works. those are from the book I mentioned earlier.
However transmitted data lost in transit sometime. Therefore data exchange is not reliable.
But the code in the link is relatively more reliable. Unfortunately it doesn't work with xbee 2.
- faludi
- Posts: 25
- Joined: Thu Jul 17, 2008 3:58 pm
Re: Good Code for XBee?
You shouldn't be losing data at all, especially with XBees that are paired together properly, at a reasonable range from each other and with a clean power source (the Arudino's 3.3 output pin should be pretty clean.
Try the code in Building Wireless Sensor Networks for the Doorbell project. It is extremely simple and relies on the XBee's transparent mode to behave essentially like a serial cable connection. Also check your radios in X-CTU to make sure that you have the latest version of the firmware. Your Series 2 might have shipped with a very early version and a lot of improvements have been made that you'll certainly want to have.
Try the code in Building Wireless Sensor Networks for the Doorbell project. It is extremely simple and relies on the XBee's transparent mode to behave essentially like a serial cable connection. Also check your radios in X-CTU to make sure that you have the latest version of the firmware. Your Series 2 might have shipped with a very early version and a lot of improvements have been made that you'll certainly want to have.
-
- Posts: 1
- Joined: Mon Jun 11, 2012 5:38 am
Re: Good Code for XBee?
Then you should check the code - may be there's an error somewhere.wnc wrote: The code I have tried is simple and works. those are from the book I mentioned earlier.
However transmitted data lost in transit sometime.
Please be positive and constructive with your questions and comments.