Stepper motor spinning forever

if (resultado == "a")This is comparing a character to a null-terminated string and is syntactically incorrect. The compiler allows it, but in my view it shouldn't. The results are unpredictable.