5 years, 7 months ago.  This question has been closed. Reason: Off Topic

How to use only one button to display different things on nokia display?

My question is simple, but I dont know how to realize it? So I can use only one button(on LPC1114).

If button is pressed , I need to do one thing, and if same button is pressed again I need to do another thing. And over and over again like that. So to understand me better I will explain you like this:

Press button -> do thing 1 Press button -> do thing 2 Press button -> do thing 1(again) Press button -> do thing 2 Press button -> do thing 1 Press button -> do thing 2

and so on. So I dont realize how to do this if I am using only one button. Thanks!