N00b: pausing a loop

How do you have wired your switch? Is it possible that you're measuring a floating pin?