XBee Remote control works for a while then receiving program freezes
vanmunch
Posts: 568
Solved!!!!!!!
After fighting with this problem for the last 2-3 weeks I finally figured it out. I had the "Send" program in it's own cog and had it repeat. The problem was fixed after I had the main program call the "Send" method at the end of each repeat. I stepped back and did some laundry and thought some more about how the DIN LED would freeze on and that maybe having it constantly send the data was the problem. Anyhow, hopefully this all helps someone else and thanks again PJ for your suggestion and encouragement.
Dave
+++++++++++++++++++++++++++++++++++++++++++
Hello,
I've been having a goofy problem with my receiving XBee program that controls my robot and I was hoping that someone could help and that may be this could help someone else. The code that I'm using is attached below. Originally I thought it was interference, I don't think that's the case.
Everything seams to be working fine when I don't have the robot arm or wheel power connected (just the board outputting to the computer). However, once I power up the arm and wheels, the board seems to randomly freeze and sometime it outputs gibberish and both the DOUT and DIN LEDs turn on and stay on instead of just the DIN flashing like it's suppose to. I think the arm is drawing too much power and eventually the battery can't give enough current so the whole thing falls apart, but I'm not sure. I'm currently using a propeller servo controller with the hope that that would fix the problem, but it still happens and I was hoping that someone could take a look at my code and make sure it's not a software problem. I worked through all of the chapters in the "Getting started with XBee...", but I'm still a bit confused. Any help or suggestions would be appreciated. I had thought the XBee part was going to be the easy part....
Robot_V1.3.1usingPSC.spin ControllerV1.3.1ForPSC.spin
After fighting with this problem for the last 2-3 weeks I finally figured it out. I had the "Send" program in it's own cog and had it repeat. The problem was fixed after I had the main program call the "Send" method at the end of each repeat. I stepped back and did some laundry and thought some more about how the DIN LED would freeze on and that maybe having it constantly send the data was the problem. Anyhow, hopefully this all helps someone else and thanks again PJ for your suggestion and encouragement.
Dave
+++++++++++++++++++++++++++++++++++++++++++
Hello,
I've been having a goofy problem with my receiving XBee program that controls my robot and I was hoping that someone could help and that may be this could help someone else. The code that I'm using is attached below. Originally I thought it was interference, I don't think that's the case.
Everything seams to be working fine when I don't have the robot arm or wheel power connected (just the board outputting to the computer). However, once I power up the arm and wheels, the board seems to randomly freeze and sometime it outputs gibberish and both the DOUT and DIN LEDs turn on and stay on instead of just the DIN flashing like it's suppose to. I think the arm is drawing too much power and eventually the battery can't give enough current so the whole thing falls apart, but I'm not sure. I'm currently using a propeller servo controller with the hope that that would fix the problem, but it still happens and I was hoping that someone could take a look at my code and make sure it's not a software problem. I worked through all of the chapters in the "Getting started with XBee...", but I'm still a bit confused. Any help or suggestions would be appreciated. I had thought the XBee part was going to be the easy part....
Robot_V1.3.1usingPSC.spin ControllerV1.3.1ForPSC.spin
Comments
That's a good idea. I'm using proto boards, but I should be able to rig up the same set-up using a propeller demo board and power the XBee using 3.3V regulated power from a GG platform later tonight and I'll let you know what happens.
Did the code look ok? Thanks again for your suggestion!
Dave
One of the Spin-Meisters will jump in, I'm still something of a Recursionator :zombie: .
I hooked up a second power unit and it did the same thing as before. Everything works well for ~0.2-2 minutes and then it randomly sends gibberish to the serial terminal and the LED for the DIN stays on. It didn't matter if unpowered- repowered the XBee. Any more suggestions before I move it to the propeller forum?
Getteth thee to the Propeller Forum.
(What's the difference between random gibberish and orderly gibberish? Nevermind.)
Ha Ha
WIll do, and I just doubled checked and it does the same thing even with no power to the arm.
Have fun!
After fighting with this problem for the last 2-3 weeks I finally figured it out. I had the "Send" program in it's own cog and had it repeat. The problem was fixed after I had the main program call the "Send" method at the end of each repeat. I stepped back and did some laundry and thought some more about how the DIN LED would freeze on and that maybe having it constantly send the data was the problem. Anyhow, hopefully this all helps someone else and thank PJ for your suggestion and encouragement.
Dave