Shop OBEX P1 Docs P2 Docs Learn Events
BS Menu System — Parallax Forums

BS Menu System

ArchiverArchiver Posts: 46,084
edited 2003-06-21 13:45 in General Discussion
Hi all,

Does anyone know of any docs or websites that talk through coding some form of
menu/user input system on a BS2?

I'd like to have some way of the user entering a couple of numeric values using
just a couple of buttons (UP, DOWN, ENTER sort of thing). And rather than
reinvent the toaster, I thought I'd see if anyone had written a nice article on
it at all???

Cheers for any help all


Kev/.
kevp.com


[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-06-20 14:16
    I would use QBasic programming language (compiler should be included
    with windows, but you can download compilers for free all over the
    web). Here's a page that describes using QBasic to talk to the stamp:
    http://www.pacifier.com/~mcginty/qbstamp.htm
    make sure you change the baud rate code to match the basic stamp
    you're using (he used a bs2).



    --- In basicstamps@yahoogroups.com, "Kev Pearce \(kevp.com\)"
    <email.me@k...> wrote:
    > Hi all,
    >
    > Does anyone know of any docs or websites that talk through coding
    some form of menu/user input system on a BS2?
    >
    > I'd like to have some way of the user entering a couple of numeric
    values using just a couple of buttons (UP, DOWN, ENTER sort of
    thing). And rather than reinvent the toaster, I thought I'd see if
    anyone had written a nice article on it at all???
    >
    > Cheers for any help all
    >
    >
    > Kev/.
    > kevp.com
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-20 14:45
    QBasic??? Maybe I should be a little clearer, I'm after a menu system to run
    on the stamp with an LCD and a couple of buttons connected to the stamp, as
    a stand alone system, no pc. These values are then used by the stamp to
    check thresholds on a number of sensors and alert the user if these user
    configureable thresholds are exceeded.

    Cheers

    Kev/.

    Original Message
    From: "Sam" <hard-on@t...>
    To: <basicstamps@yahoogroups.com>
    Sent: Friday, June 20, 2003 2:16 PM
    Subject: [noparse][[/noparse]basicstamps] Re: BS Menu System


    > I would use QBasic programming language (compiler should be included
    > with windows, but you can download compilers for free all over the
    > web). Here's a page that describes using QBasic to talk to the stamp:
    > http://www.pacifier.com/~mcginty/qbstamp.htm
    > make sure you change the baud rate code to match the basic stamp
    > you're using (he used a bs2).
    >
    >
    >
    > --- In basicstamps@yahoogroups.com, "Kev Pearce \(kevp.com\)"
    > <email.me@k...> wrote:
    > > Hi all,
    > >
    > > Does anyone know of any docs or websites that talk through coding
    > some form of menu/user input system on a BS2?
    > >
    > > I'd like to have some way of the user entering a couple of numeric
    > values using just a couple of buttons (UP, DOWN, ENTER sort of
    > thing). And rather than reinvent the toaster, I thought I'd see if
    > anyone had written a nice article on it at all???
    > >
    > > Cheers for any help all
    > >
    > >
    > > Kev/.
    > > kevp.com
    > >
    > >
    > > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-20 17:36
    Kev/.,

    I would look into a graphic display from Parallax which you can
    interface to your BASIC Stamp very easily. Follow the link below for
    more info:

    http://www.parallax.com/detail.asp?product_id=30053

    ~ed


    --- In basicstamps@yahoogroups.com, "Kev Pearce \(kevp.com\)"
    <email.me@k...> wrote:
    > QBasic??? Maybe I should be a little clearer, I'm after a menu
    system to run
    > on the stamp with an LCD and a couple of buttons connected to the
    stamp, as
    > a stand alone system, no pc. These values are then used by the
    stamp to
    > check thresholds on a number of sensors and alert the user if these
    user
    > configureable thresholds are exceeded.
    >
    > Cheers
    >
    > Kev/.
    >
    >
    Original Message
    > From: "Sam" <hard-on@t...>
    > To: <basicstamps@yahoogroups.com>
    > Sent: Friday, June 20, 2003 2:16 PM
    > Subject: [noparse][[/noparse]basicstamps] Re: BS Menu System
    >
    >
    > > I would use QBasic programming language (compiler should be
    included
    > > with windows, but you can download compilers for free all over the
    > > web). Here's a page that describes using QBasic to talk to the
    stamp:
    > > http://www.pacifier.com/~mcginty/qbstamp.htm
    > > make sure you change the baud rate code to match the basic stamp
    > > you're using (he used a bs2).
    > >
    > >
    > >
    > > --- In basicstamps@yahoogroups.com, "Kev Pearce \(kevp.com\)"
    > > <email.me@k...> wrote:
    > > > Hi all,
    > > >
    > > > Does anyone know of any docs or websites that talk through
    coding
    > > some form of menu/user input system on a BS2?
    > > >
    > > > I'd like to have some way of the user entering a couple of
    numeric
    > > values using just a couple of buttons (UP, DOWN, ENTER sort of
    > > thing). And rather than reinvent the toaster, I thought I'd see if
    > > anyone had written a nice article on it at all???
    > > >
    > > > Cheers for any help all
    > > >
    > > >
    > > > Kev/.
    > > > kevp.com
    > > >
    > > >
    > > > [noparse][[/noparse]Non-text portions of this message have been removed]
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    Subject and
    > Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-20 17:36
    >QBasic??? Maybe I should be a little clearer, I'm after a menu system to run
    >on the stamp with an LCD and a couple of buttons connected to the stamp, as
    >a stand alone system, no pc. These values are then used by the stamp to
    >check thresholds on a number of sensors and alert the user if these user
    >configureable thresholds are exceeded.
    >
    >Cheers
    >
    >Kev/.
    >


    In psuedo-code, something like this...?

    ' in0 is "Enter"
    ' in1 is "UP" increment for each press
    ' in2 is "DOWN" decrement for each press
    For prompt=1 to numberOfPrompts
    gosub displayPromptLine1
    read currentValueOfParameter, X
    Do until enterbutton=1
    gosub displayParameterLine2 ' display X on line 2, clearing space.
    buttonStates=inA ' three buttons, up, down, enter
    buttonsX=buttonStates ^ oldStates & buttonStates ' transition 0-->1
    enterButton=buttonsX.bit0
    X=X + buttonsX.bit1 - buttonsX.bit2
    loop
    ' continue here when enter is pressed
    next ' next parameter, until all are entered

    This kind of program tends complicate itself, the more you think
    about the niceties! For example, you might want it to
    auto-increment if the button is held down for a while. (The BUTTON
    command does have autoincrement built in.)
    The logic in the above program tests for a 0->1 transition on the
    buttons. If there are a lot of parameters, you might want to present
    them in a menu first, for the user to choose which one to change.
    Some parameters, like time/date setting for example, or text entry,
    can require special coding.

    -- best regards
    Tracy Allen
    electronically monitored ecosystems
    http://www.emesystems.com
    mailto:tracy@e...
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-21 07:38
    One of my first project, of course, was a basic clock. I had a one button
    interface to set the time, and ten lights representing the digits 0-9. When
    it displayed the time, the lights flashed one digit, paused, then the next
    digit, etc. You tapped the button one to start the "set" mode. Then, the
    lights cycled slowly through the digits, and you simply hit the button on
    the correct digit. Four times through for hours and minutes, then set mode
    was done and went back to display mode.

    It would be a simple matter to make a couple of other buttons act as a down
    and up counter, and use 7 segment displays to display the values instead of
    single LEDs.

    Steve

    Original Message
    From: "Kev Pearce (kevp.com)" <email.me@k...>
    To: <basicstamps@yahoogroups.com>
    Sent: Friday, June 20, 2003 1:11 PM
    Subject: [noparse][[/noparse]basicstamps] BS Menu System


    > Hi all,
    >
    > Does anyone know of any docs or websites that talk through coding some
    form of menu/user input system on a BS2?
    >
    > I'd like to have some way of the user entering a couple of numeric values
    using just a couple of buttons (UP, DOWN, ENTER sort of thing). And rather
    than reinvent the toaster, I thought I'd see if anyone had written a nice
    article on it at all???
    >
    > Cheers for any help all
    >
    >
    > Kev/.
    > kevp.com
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-06-21 13:45
    Wow! Thanks for a great reply Tracy. I shall have a play...
    Thanks once again...

    Kev/.

    Original Message
    From: "Tracy Allen" <tracy@e...>
    To: <basicstamps@yahoogroups.com>
    Sent: Friday, June 20, 2003 5:36 PM
    Subject: Re: [noparse][[/noparse]basicstamps] Re: BS Menu System


    > >QBasic??? Maybe I should be a little clearer, I'm after a menu system to
    run
    > >on the stamp with an LCD and a couple of buttons connected to the stamp,
    as
    > >a stand alone system, no pc. These values are then used by the stamp to
    > >check thresholds on a number of sensors and alert the user if these user
    > >configureable thresholds are exceeded.
    > >
    > >Cheers
    > >
    > >Kev/.
    > >
    >
    >
    > In psuedo-code, something like this...?
    >
    > ' in0 is "Enter"
    > ' in1 is "UP" increment for each press
    > ' in2 is "DOWN" decrement for each press
    > For prompt=1 to numberOfPrompts
    > gosub displayPromptLine1
    > read currentValueOfParameter, X
    > Do until enterbutton=1
    > gosub displayParameterLine2 ' display X on line 2, clearing space.
    > buttonStates=inA ' three buttons, up, down, enter
    > buttonsX=buttonStates ^ oldStates & buttonStates ' transition 0-->1
    > enterButton=buttonsX.bit0
    > X=X + buttonsX.bit1 - buttonsX.bit2
    > loop
    > ' continue here when enter is pressed
    > next ' next parameter, until all are entered
    >
    > This kind of program tends complicate itself, the more you think
    > about the niceties! For example, you might want it to
    > auto-increment if the button is held down for a while. (The BUTTON
    > command does have autoincrement built in.)
    > The logic in the above program tests for a 0->1 transition on the
    > buttons. If there are a lot of parameters, you might want to present
    > them in a menu first, for the user to choose which one to change.
    > Some parameters, like time/date setting for example, or text entry,
    > can require special coding.
    >
    > -- best regards
    > Tracy Allen
    > electronically monitored ecosystems
    > http://www.emesystems.com
    > mailto:tracy@e...
    >
    >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
Sign In or Register to comment.