Here’s how it rolls: I have been working franticly on autonomous for the past 3 weeks and am still having no luck. I adapted the code to use 6 sensors with 4 servos, but whenever i load i get different errors (ie, flashing program light, or ram dump, or red program light, or red/green/red/green/… program light, etc.) Ive just about given up, so ive zipped my code and i am beggina anyone who can to check it out and see if they can find the error. i think it is either in tracker.c, navigate.c, user routines.c, or thier respective headers. Thank you so much.
we had a BUNCH of the same stuff. your code is fine (i take the liberty to say that though i have not looked thrugh it) but it is too big. if you get the ram dump/program light make the program smaller. do a search, for example take out all the printF statements and uninclude the libray. also, take out unesseary IF statements, or turn repeated code into a loop.
Names I randomly chose. I’ve always liked the name Bob–short and simple, and when i came to it and needed another temp variable i asked the nearest person and he said “Pete.” Anyways here’s the map file and i have one other tidbit of information for you. When i run the defualt tracker code i get the yellow blinking program state light, but it disaplys the printf statements but does not move the servo. When i reset, the light turns green, but no amount of coercing can make it do anything. Also, the default navigate code results in a red program led (i.e. runtime error of some sort). This may be of some help. And thank you so much Kevin.
P.S. I’ve been, um, informed, that one of our Frosh dropped the CPU a while back (his execution date is still being decided, I’m voting for the opening ceremonies of Sacto). I’m wondering if this could be an intermittent error due to a loose wire or connection of some sort.
Hmmm… The fact that you can’t run the tracker code (from frc_tracker.zip, right?) would seem to indicate that the RC was messed-up. Please send me your entire build directory, or at the very least, your navigate.hex file. I’ll load it into a known good RC and get back to you. My e-mail address is firstname.lastname@example.org.
Well from your map, your code is definately not “too big.” You’re only at 55% usage right now (just be careful in the future). Further, the compiler will tell you if you overflow, anyway.
The problem you describe sounds slightly similar to one we had a while ago, so take a look for this: We found that having any printf() statements before initialization caused the robot to go pretty much completely dead, with a red/green/red/green light, and it took us forever to find out the problem. As a precaution, make sure that no functions that need to be initialized are called before they are, as it can really mess you up.
Other than that, I can’t give you any good advice right now :), except make sure you don’t have any infinite loops and no unhandled interrupts, as those can cause the red program light. Will try and read your code more in depth later today.