Thanks for your replies,
I have 10k resistors to ground so pulldowns, it won't be a problem to change them, but as a matter of interest why is it best practice?
Is it something to do with how much the MCU can sink or source current?
OK, I thought that I had reduced the code to small enough functions, but clearly I have a great deal more to learn!!! I had an idea that if I could get the bleep on a button press, then later I could expand that to a short series of bleeps as an alarm-test. I will do as you suggest and simplify the code further.
I thought it was something like that, I wasn't sure exactly what was going wrong though!
To all,
I'm sorry about the confusion over the lastButtonPushed variable, I should have made it clearer this an abstract from other code.
There are actually four buttons to control the menus and they do need to be de-bounced, since eventually they will be incrementing and decrementing counters for the various timers.
I am quite happy to post the full code, if it helps, but I thought it might confuse matters.
Once again THANKS for the help it is most appreciated.
Steve.