Button code

Hello all,
I’m in need to find some code to that can recognizes a button push v. a button hold for one sec, for a project with a alarm clock.

Thanks,
Picksomethingelse.

http://playground.arduino.cc/Code/HoldButton

The first of 2.8 million hits for "arduino button hold 1 sec" in Google search.

Take a close look at Mr. Gammon's Switch Manager library.
And read his discussion.
http://gammon.com.au/Arduino/SwitchManager.zip

http://www.gammon.com.au/forum/?id=11955

.

See example here:

.