Shop OBEX P1 Docs P2 Docs Learn Events
Managing menus in PBASIC? — Parallax Forums

Managing menus in PBASIC?

planktonplankton Posts: 18
edited 2009-08-08 05:58 in BASIC Stamp
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

Comments

  • JomsJoms Posts: 279
    edited 2009-07-27 22:35
    I assume your using a Parallax LCD?

    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...
  • jhirschjhirsch Posts: 2
    edited 2009-08-07 18:33
    I am interested in this also. I did a quick search on the internet but everything I came up with is in Visual Basic. A long time ago I wrote something like this in basica or gwbasic. They were to a screen not to an lcd though. The basis of the routine would be a good start. The problem is I can not find it. Search the internet for a basica of gw basic routine. Let me know if you make any headway. Surely someone has done this.

    Jim
  • planktonplankton Posts: 18
    edited 2009-08-08 05:58
    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
Sign In or Register to comment.