NOT1:
i want to press the button and the servo rotates to one side and when reaches 0º rotates to 180 but when i unpress the button the servo stops rotating and when i press the button the servo starts rotating again in the same direction
I can't tell how much of this is behaviour you want, and how much is a description of faulty behaviour. Can you clarify what behaviour you want, and what behaviour you currently have?