This is a project for a class of mine and thus far works perfectly. However the issue is when I press the SELECT button (in the switch case statement in void loop) whatever follows constantly gets repeated and doesn't run once. I've tried an if statement to say if such and such position is not met then run the following, but it loops the if statement over and over without breaking as well. How would I go about it so that when I press the select button once, it will just run those functions?
If the rest of the code is necessary, I'll provide it. (Didn't include it for safety reasons).
However the issue is when I press the SELECT button (in the switch case statement in void loop) whatever follows constantly gets repeated and doesn't run once.
All that is in the SELECT case is commented out. How can you tell that it executes more than once?
Where do you reset buttonPressed? Now, perhaps, you can see why readButton() should return a values, instead of diddling a global.