nur noch eine frage:

warum fragst du jedes mal taste == PollSwitch() ab?

du hast doch oben schon die do-while schleife, daher wird es in diesem fall auch gleich sein.