All that is in the SELECT case is commented out. How can you tell that it executes more than once?
Well that's the thing, I'll need it pressed for it to actually run the SELECT case.
Where do you reset buttonPressed? Now, perhaps, you can see why readButton() should return a values, instead of diddling a global.
I am working off a template. I understand globals can be avoided but I have to use the provided template.
EDIT: updated code in the main post