Push button trigger sequence

You seem to need to know when the button becomes pressed and when it becomes un-pressed. Do you have pin A2 coded as input PULLUP?
Please include you code.
Paul