|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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. . |
|
#3
|
||||
|
||||
|
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 |
|
#4
|
||||
|
||||
|
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.
|
|
#5
|
||||
|
||||
|
Re: Autonomous only works 3 times after download
My guess was that the microcontroller gets turned off and then back on to cause the autonomous to run for a 2nd, 3rd, ... time. Hence my suspicion that something other than remembering to reinit variables is the problem.
|
|
#6
|
|||
|
|||
|
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). |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GetImage only works when dashboard running? | EnigmaSolution | NI LabVIEW | 2 | 01-02-2009 14:03 |
| Only Camera works in Dashboard | keehun | Programming | 1 | 06-01-2009 07:22 |
| New autonomous method in the works :D | Spencer E. | Programming | 9 | 09-09-2007 19:16 |
| Keepers after autonomous | Spencer E. | Rules/Strategy | 30 | 05-03-2007 12:31 |
| 'Program State' LED stays blinking yellow after download | clynch | Control System | 5 | 18-02-2004 19:34 |