I am giving 2 inputs and both will be ON at some point of time (considering) , so what I want is if the order is 1st ON and 2nd ON I want the motor to rotate to direction 1... wait 3 sec and then rotate to direction 2.
If we have 2nd ON and then 1st ON, the reverse should happen.