I'd turn the code around.
Lose the for loops, and make the servo movement conditional on a single Boolean which is set true if you receive 'a' and false if you receive 'b'.
I'd turn the code around.
Lose the for loops, and make the servo movement conditional on a single Boolean which is set true if you receive 'a' and false if you receive 'b'.