Hi all, I need help on a project whereby curtain of my house's sun roof should be opened and closed using a pushbutton. I already have built and installed the mechanical stuff. It works just fine. I need to use Arduino to control that as follows: 1- Pushbutton is momentarily pressed, LED attached to pin 4 goes HIGH, preferably for some time, say 30Sec. 2- Pushbutton is pressed again, LED4 goes LOW. 3- Pushbutton is pressed again, another LED attached to pin5 (NOT 4) goes HIGH, preferably for about 30Sec. (this step for reversing the motor) 4- Pushbutton is pressed again, LED5 goes LOW. That will help me controlling the motor as: RUN – STOP – REVERSE – STOP. My main difficulty is with the 3rd step where pressing the pushbutton should not turn the LED attached to pin 4 on again. Instead, LED5 attached to pin 5 should turn on to reverse the motor.
Any help would be appreciated!