Button to start/stop while loop.

Your while loop is stuck because you never read the switch again