Brain keeps freezing

Vex robot brain keeps freezing when I go to run the code. It is just simple code to like a forever loop and some sound effects. Me and my partner and class have been having problems with this robot if somebody knows how to fix this please let us know.

Can you post your code?
As in freezing, does the screen turn white, or simply stop?

If it says something like “User project has exceeded time limit of 3 seconds” and you are using text, most likely you need to add a wait in your while loop.

while (true) {
  // Do whatever
  vex::task::sleep(20);
}

or

while (true) {
  // Do whatever
  wait(20, msec);
}

Either will work. If that is not your problem, we’ll need to know more.

2 Likes