I am doing a project in which I am trying to control several different motions of the motor using an Arduino and buttons. I have written down my program but it is not working. I understand the buttons are momentarily push buttons but I cannot figure out how to operate them as Maintained Push buttons.
The project is simple. There are 4 buttons and each button will activate 4 different motions. If one button is pressed twice, the motor turns OFF. The motor is connected to a linear actuator so it always turn ON and OFF at one end of the actuator.
I have posted my program below. Can someone help me change it a bit or advise me on how to make it work?
Main Program.txt (2.57 KB)