I am a high school student that is in the PLTW program. I am trying to figure out how to make a button press toggle my program to enabled and disabled. I do not know if it is possible, or if we have to use a different method to do this.
currently using an if statement to check for the button press, then depending on the state variable initialized before, it turns it on or off, however it never seems to start the motor. Any good toggle methods that work?