updated Arduino code with debounce and no restart option