Arduino | IR | Menu

Hi Folks -

i need some help. I am trying to build a menu system using a remote controller as an input.
I would like by default to show my clock and with a press of a button on the remote controller
i would like to start a menu system from which i shall be able to navigate trough the features Count Down Timer, Count Up Timer, Intervall, Tabata. The navigation should be achieved by pushing the up and down keys on the remote controller. Selecting one of the options would go with the OK key with that the selected item shall start where the timer can be set also with the up and down keys, navigating from left to right with the left and right keys and finally to start the program with OK button

how can i achieve this. I would appreciate any help. I have started something which works but thats not really the complication i need.

void menu(){

digitalWrite(latchpin, LOW);
shiftOut(datapin, clockpin, MSBFIRST, 57); // Display C
shiftOut(datapin, clockpin, MSBFIRST, 94); // Display d
shiftOut(datapin, clockpin, MSBFIRST, 0); // Display Nothing
shiftOut(datapin, clockpin, MSBFIRST, 0); // Display Nothing
digitalWrite(latchpin, HIGH);

}

void loop(){

if(irrecv.decode(&results)){
switch(results.value){
case 0xFAF110A8: //ZoomIn button is pressed
menu();
break;
}
irrecv.resume();
}

What display device are you using? An LCD1602, a larger LCD/TFT or what ?
But it principle, the user would want to scroll up and down through the menu options, select another menu panel or action. Also go back through the menu hierarchy or jump back to the start.
Design the menu hierarchy and actions on paper, then start thinking about the implementation.

I am using a custom built 7 seg led with 595 shiftregister.

i want to define a button to jump into the menu system and from there to be able to scroll through the features and upon selection the necessary settings and start action.

I want to give the option to go back and forth within the menu system.

The problem i am facing is this whol loop section where i do see if i read the remote key once i call the function it works but from the function to call again a key press action would not work. within the loop to ask the second time around key presses wont work neither. I am missing something for sure.

I have some difficulty visualising what you want to achieve. A seven segment display is very limited for assisting a user to navigate through a series of options.

But lets say you have these options (taken from the OP)

clock
countdown timer
countup timer
Interval
Tabata

Since you can't write the name of the option on a seven segment display, you must number these options.

so the user must scroll up and down the number series 1 to 5 ( or maybe just select the number 1 to 5 directly from the keypad).

So lets suppose the user selects countdown timer somehow, what are you expecting next. That he enters the initial value of the count down sequence and the speed of the countdown ?

If that is the case, it is looking like you'll need some sort of state machine solution. But, the first thing is to do is as I said before namely design the menu hierarchy and actions on paper then it is clearer what solution is appropriate.

that he enters the initial value of the countdown sequence. For example 20min and the timer will start with the countdown until 00:00

The menu system is a three layer hierarchy system. MainMenu - MenuOptions - Action
I do have already everything on paper but im fighting with the implementation because its not working out how I have imagined it. This is why i need some examples where maybe a simple elegant solution might be adaptable in my case too.

For the moment i am using something like this:

which does not work as expected for now.