Hey, I was interfacing my LCD with RPi and used this library really loved it but now i wanted to create a menu which can be run with buttons like when i press the button i get into its inside menu. Can anyone help me? I searched but cannot find anything about creating a menu tree.
For Example:
I Have three buttons A, B and C.
A is for enter,
Bis for next,
C is for back.
Now i want to create a menu like
Fruits
-Apple,
-Banana.
Vegetables
-Cabbage,
-Spinach.
So I want to create a program in LCD by which i can roam around in this type of menu.
Point me in direction i'll do the work.
Any help is greatly appreciated.
Hi. What you want doesn't have anything specifically to do with RPLCD.
What I would recommend is to do the following:
Create a class that contains the three menu items
That class can store the currently selected item
Create a function that returns the menu as a list of strings with the correct length (e.g. 16 chars if you have a 2x16 LCD), which can be directly written to the LCD
When you press a button to change the selected item, update the class, re-generate the menu strings and write them to the LCD
Hey, I was interfacing my LCD with RPi and used this library really loved it but now i wanted to create a menu which can be run with buttons like when i press the button i get into its inside menu. Can anyone help me? I searched but cannot find anything about creating a menu tree. For Example: I Have three buttons A, B and C. A is for enter, Bis for next, C is for back. Now i want to create a menu like
So I want to create a program in LCD by which i can roam around in this type of menu. Point me in direction i'll do the work. Any help is greatly appreciated.