LCD menu with submenu

Hi, I’ve made a project with the arduino mega that controlls 3 leds. The idea is that there is a menu that you can select 12 programs. Each program is about 30secs and blinks the leds. Now I want to make the same project but with this kind of menu with sub-menus:

Menu → selection 1 → selection 2 → selection 3 → selection 4
prog 1.1 prog 2.1 prog 3.1 prog 4.1
prog 1.2 prog 2.2 prog 3.2 prog 4.2
prog 1.3 prog 2.3 prog 3.3 prog 4.3

I’ve seen every video on youtube and every other info in every forum and I didn’t find anything to help me. So this is my last chance. If someone can help me or guide me I would appreciate it very much!

project.ino (69.2 KB)

What are you using for input to navigate the menu options?

What size display?

How do you want the menu to work? (need a few more details)

There is a shield equipped with an LCD display and 6 buttons. Search for that, its code and look at how the menue system there is built.

The last thing you need, is something to figure out first. How are you going to annotate the current selection and/or the selected item.

Then just keep track of two variables (page_number and item_number). Use a switch statement on page_number to draw out each of the menus. Then use a second switch statement to move the selection cursor.

I believe this sketch, with some modification would suit.

Can you give us the link or show the code?

Theofoil — I’m not sure what code/library the original poster ended up finding, but I would definitely take a look at neu-rah’s ArduinoMenu to see if it does what you need.