Is this possible to loop?

Sorry i have not got the sketch to hand, its in the workshop and its dark outside :(.. will try and explain and post sketch if needed.

I have a sketch setup to call 4 functions using a push to make button connected to digital pin 2 (Uno) After each press it goes to the next function funtion1, function2 function 3 and function 4 and when it reaches 4 it will go back to 1. All this works fine but i have built the PCB for it now and have made 3 of them for me and 2 friends, But now i want to change how the push button works and not redesign the PCB to add extra buttons.

In the Loop() function i have a switch statement that works out what number is on, stores it in memory and then calls the corrosponding function (Each function has basic text that is display either via a lcd or through the TVout).

What i would like to do now is keep it as it is but add a function to it that will run all 4 functions every 10 seconds or so when the press button (DP2) is pressed for 5 seconds. At the moment if i press and hold it will just loop through all 4 functions with a 1000ms delay between each.

Sorry i know its hard to help without code to look at and i will post it Friday as soon as i return from work.


Without the code, the best I could do it say yes, that is entirely possible.

Look at the blink without delay examples. Remember if you do something if a button is pressed for a certain time then you have to wait for a button up to occur in less than that time to engage the original function.