Xbee wireless problem. Program seems to be waiting for data when I don't want it to.
Rick G.
Posts: 9
Hi Everyone,
first time writing here, I hope someone can help. I have a board in a submarine that needs updating for three values from time to time. When I'm not sending those new values to the sub from a remote programming pendant, I want the sub's board to continue with the program. It seems to be hanging up at the XB.rx part where it normally awaits new data. It seems to always pick up the transmitted data fine, probably because its just sitting there until it gets a valid signal.
What I need is a way to set a timeout that moves it beyond that line of code. I'll be looking through the reference book for more info. Thanks in advance.
Rick G.
first time writing here, I hope someone can help. I have a board in a submarine that needs updating for three values from time to time. When I'm not sending those new values to the sub from a remote programming pendant, I want the sub's board to continue with the program. It seems to be hanging up at the XB.rx part where it normally awaits new data. It seems to always pick up the transmitted data fine, probably because its just sitting there until it gets a valid signal.
What I need is a way to set a timeout that moves it beyond that line of code. I'll be looking through the reference book for more info. Thanks in advance.
Rick G.
Comments
http://www.parallax.com/Store/Accessories/CommunicationRF/tabid/161/ProductID/718/List/0/Default.aspx?SortField=ProductName,ProductName
-Martin
thanks. Being relatively new to using SPIN and having basically finished the code for this project, I'm a little gun shy to start a new cog for this. I thought of that earlier but was hoping for a timeout value like the one you suggested. Thanks. If that doesn't work, I'll go the way of the Cog.
Thanks again.
Rick
thanks for getting back to me so fast! I put that XB.rxtime(1000) in there and it works great! All it was doing while waiting for a signal was watching a reed switch for a magnet to pass by. The magnet passes the reed switch in at least a half second, probably more, so even with a much higher 'timeout' value, I still wouldn't miss the magnet. Thanks again.
rick G.
finished the project! Thanks again. One other note, I posted that I had put XB.rxtime(1000), oops! I didn't look that closely at first and woke up the other morning and realized that the 'time' was in ms, not uS. That would've caused some problems, but I caught my mistake and changed it appropriately. thanks again.
Rick g.
Congrats on a finished project,
-Martin