Ahh maybe thats why it's got issues. Standard microswitches inputs work great with this Arduino code.