programs being erased

okay, so we compile the program and load it onto the controller, and it runs the program fine. if we power down the controller and power it back up, though, the robot controller program light flashes alternately red and green, and the program wont run unless i reload the .hex file onto the controller. is this normal, or are we doing something wrong, or is it a problem with the controller?

do you have the backup 7.2volt battery connected to your controller when you power it down?

nope… does that have to be plugged in for it to even keep the code in memory? i thought it was just to keep the program from resetting if it lost power

It doesn’t. I just power down, And so far it’s worked ok. Is there anything advanced or weird in your code? are your versions updated? Are you mixing up EDU and FRC code?

Or worse yet…are you mixing PBASIC from last year’s code with C? We’ve done that a few times already (it’s not my fault…honest), and the results aren’t pretty.

Have you tried just running the default code in your robot?

The fact that the program LED is flashing green then red probably means that your code starts running, but fails to communicate with the master processor soon enough, so the master processor resets it. Since it works after downloading, you might start by looking carefully at your initialization code. Also, the suggestion of trying the default code again would be a good idea to confirm that the RC is OK (which I imagine it is). Assuming the default code works, then the fault almost certainly lies with a bug in your software.

Hey, I have a similiar problem the controller blinks red when I upload the program. It saids that the red blinking means a code error, but its the default beacon code. When the tether is hook in the controller goes to red, when the tether is out, its runs fine. Anyone have any clues

I’ll make the obvious points:

  1. Make sure all the cables are hooked up correctly
  2. Make sure everything is turned on. Power the Operator Interface up before the robot controller.
  3. Make sure the cables work. Try different ones.

I can’t think of anything else. Hope you get it working. :frowning:

Hey, I have a similiar problem the controller blinks red when I upload the program. It saids that the red blinking means a code error, but its the default beacon code. When the tether is hook in the controller goes to red, when the tether is out, its runs fine. Anyone have any clues

We had the same prolbem, though I frogot how we fixed it. Make sure that you are using the right program for the controler (FRC for FRC, FRCEdu for FRCEdu…).

I think that I read somewhere that this year’s tether’s different (Duh!). Check ports, like he said!

well… we are using a modified combination of the edu code and the frc code so that we can run the beacon and the receiver on the same controller since our team didnt get an edu controller. the only edu code left in there is the beacon.c and beacon.h (modified to run on the frc of course) though, all the rest is frc code… is there something that we missed when we combined them?

I posted code that does the same thing here /t/ir-from-scratch/49453/1 if you want to try it to see if it behaves the same way in your controller as your version does.