stay in the same value of analog input give output one time

do you add if condition if (x==1)