Timed servo door for chiken coop

Maybe show your code for some advise?