![]() |
Autonomous only works 3 times after download
Hello,
In the course of my programming the VEX robot microcontroller, I have developed 4 different autonomous modes. In the modes, I use a combination of 2 encoders, 1 sonar sensor, 2 potentiometers and 5 line followers. When I download the code, it will function perfectly for the first 3 trials but then it will start doing very strange things (ie; not turn, not move backwards, not stop moving backwards). Has anyone else experienced this problem? If so, how did you fix it? I realize that I could simply re-download the code before each match in Dallas but this will get rather frustrating and one more thing that we need to remember to do. Especially when we are in a rush or have other problems (usually mechanical) to deal with. Thanks! - Jenn |
Re: Autonomous only works 3 times after download
Are you using easy C?
I would think that when you develop 4 different codes, after the third trail, something goes wrong with the logic and the code does something funky, ie not turn. One recommendation is going through the code and physically saying outloud the path that the 4 codes actually take, maybe you'll find a problem. Other than that I can only suggest that you post your code and we can try to debug it. :D. |
Re: Autonomous only works 3 times after download
Quote:
If you post the software someone might be able to spot the problem for you. Blake |
Re: Autonomous only works 3 times after download
I would guess that it's even more simple than that. Do you reinitialize all your variables to zero? If not, there's a good chance one or more of them are rolling over and causing your robot to do odd things.
|
Re: Autonomous only works 3 times after download
Quote:
|
Re: Autonomous only works 3 times after download
I should have mentioned, I am using EasyC - sorry!
How can I post the entire code? It has many, many functions so it won't really make sense. I could e-mail it to anyone who would like to take a stab at it (let me know via PM). Most of the variables are global and the same for all 4 modes. The others are all preset as needed (ie: encoders). |
| All times are GMT -5. The time now is 22:21. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi