bluetooth car, obstacle avoidance, code problem

Solved

Where in this will instrucciones[3] get a new value? I think you need to post the whole code.

while(bitRead(instrucciones[3],4)!=0){ 
            valorCentro=medir();
            if (valorCentro>30 || valorCentro==0){
              adelante(); 
              digitalWrite (Velocidad, 20);
            }
            else{
              parar();
              mirar();
              if (valorIzquierda>=valorDerecha){
                izquierda();

              }
              else{
                derecha();  

              }
            }
          }

I see a lot of code that tests the value in instrucciones, but where does it get a value assigned to it.

If it doesn't happen somewhere in this while loop then you'll be stuck. If the fourst bit of instrucciones[3] is a 1 to get you into this loop and nowhere in this loop that keeps repeating is it ever assigned any new value, then when will it ever not be 1. How will you ever get out of this while loop?

while(bitRead(instrucciones[3],4)!=0){ 
            valorCentro=medir();
            if (valorCentro>30 || valorCentro==0){
              adelante(); 
              digitalWrite (Velocidad, 20);
            }
            else{
              parar();
              mirar();
              if (valorIzquierda>=valorDerecha){
                izquierda();

              }
              else{
                derecha();  

              }
            }
          }

I would suggest you either post all of your code or go here for help.