Are you trying to use a timer for the 30 second period, or trying to use a timer/counter?