For loop before Switch on int ?

Otherwise, if you do want the switch statement in there, I would make sure that you are not hitting the default pin. Also please send a picture and intended behavior if this does not fix it.