Managing menus in PBASIC?
plankton
Posts: 18
Does anyone have code examples of how to implement a multi-level menu in PBASIC?· I've been experiementing with the BUTTON command, but can't quiet figure out how to construct the menu strings and manage the menus.
Also, assume you have two keys for navigation:
1·- Down - selects the next menu item in list. The bottom of list just cycles back to the top
2·- OK - OK, Enter or Return. Basically a 'select' operation
Thanks.
Menu would like like this:
level 1 - 'Setup Time', 'Setup Temperature', 'Manual override', 'Run'
·· level 2 - 'Setup Time': 'Adjust Day', 'Adjust Month, 'Adjust Year', etc. 'Exit'
·· level 2 - 'Setup Temperature' : 'Adjust Temp1', 'Adjust Temp2', 'Exit'
·· level 2- 'Manual Override' : 'Toggle 1', 'Toggle 2', etc', 'Exit'
·· 'Run' exits edit mode and returns controller back to 'run' mode.
····· Level 3 - 'Manual Override' : 'Toggle 1' : "On", "Off", 'Exit'
···· ...
Scott
Also, assume you have two keys for navigation:
1·- Down - selects the next menu item in list. The bottom of list just cycles back to the top
2·- OK - OK, Enter or Return. Basically a 'select' operation
Thanks.
Menu would like like this:
level 1 - 'Setup Time', 'Setup Temperature', 'Manual override', 'Run'
·· level 2 - 'Setup Time': 'Adjust Day', 'Adjust Month, 'Adjust Year', etc. 'Exit'
·· level 2 - 'Setup Temperature' : 'Adjust Temp1', 'Adjust Temp2', 'Exit'
·· level 2- 'Manual Override' : 'Toggle 1', 'Toggle 2', etc', 'Exit'
·· 'Run' exits edit mode and returns controller back to 'run' mode.
····· Level 3 - 'Manual Override' : 'Toggle 1' : "On", "Off", 'Exit'
···· ...
Scott
Comments
The best way might be to use different sub-groups for each level. Then when you first enter the menu it will update the LCD, then wait for a button to be pressed...
Jim
Check out the attached·Nuts & Volts·of Basic Stamp Editions·that discuss and implement menuing systems.· Still not exactly what I'm looking for but good reads:
Column #62, June 2000 by Jon Williams: Menus Made Easy
Column #97 May 2003 by Jon Williams:· Keyboard Entry and Display
Scott