Buttons, buttons and more buttons.

Folks,

I am a long way from a newbie but still have a lot to learn.

My first (main) sketch is this alarm clock and it is working well now. Got a few niggily things resolved and am happy.

"Alas" a lot of it is around the PHI-2 shield, prompt and stuff like that.

So: I have 6 buttons - the usual ones - and they do suffice, but things are developing beyond my understanding and I see the potential for more things to be done.

One way to do it is with MORE menus and the like. Another is with HOW LONG the button is pressed.

I have downloaded these CButton.h and CButton.cpp files.

They seem to allow you to do three things with ONE button. Quite interesting really.

1 - "Normal" press
2 - "Long" press
3 - "Double" press

That is if I am reading it correctly.

Some of these would be handy for my use of the "alarm clock" to make certain functions easier and quicker to get to.

But how do I "implement" this into my sketch?

From what I have seen there is a file which deals with the buttons and what they are doing.
Do I need to "hack into that" and make that file "call" these CButton.h and cpp files?

But how do I "implement" this into my sketch?

Have you just made some test code without your sketch and gotten the button pushes to work?

zoomkat,

I didn't write the code/s CButton.h and .cpp

I got them from..... "here", or somewhere on the web but with an Arduino mention.

But I am not sure I understand your question.

But I am not sure I understand your question.

Have you done any standalone testing with the new button code?