Shop OBEX P1 Docs P2 Docs Learn Events
Help with DEBUG / SERIN?? menu options BS2 — Parallax Forums

Help with DEBUG / SERIN?? menu options BS2

RFWhackerRFWhacker Posts: 3
edited 2009-10-16 12:33 in BASIC Stamp
Normally I over complicate things and get frustrated rather quickly so hopefully somebody can bail me out on this one, plus im fairly new with microcontrollers in general. I am trying to build a BS2 program to run·with a terminal program and im getting a little confused with the syntax manual.
Essentially, here is what I am trying:

I am trying this out using a Basic Stamp HomeWork board using the supplied serial port.

I would like a menu screen to operate in this fashion-
Debug Screen shows:

--Welcome to blah blah so on
Enter a command- for a list of commands type ?


*so, if a user types ? it would show some text·with avaliable options menu

or, if a user knows the command that they are going to use types in a command, for instance

S- Selects device (in this case a I/O pin, so, like typing 1 would select P1, then)

then the next command would be

T- toggle- make the pin go low or high for a specific amount of time....




Ok, im sure this is not explained the best way, but if anybody semi-understands what i'm after, that would be greatly appreciated! Once I see it, I can run pretty far with it and modify what I need to to get the rest done.


Thank you sooo much in advance!!!!

Mark




·

Comments

  • MorrolanMorrolan Posts: 98
    edited 2009-10-16 12:33
    I understand what you mean!

    What you need to do is store the input value from DEBUGIN and then lookup SELECT...CASE statements. That will allow you to display different results on the screen depending on what character you input, i.e. you can then make '?' print a list of options, or S1 could select P1 etc.

    If you look at the examples on the DEBUGIN in section of the Syntax and Reference Manual

    www.parallax.com/Portals/0/Downloads/docs/prod/stamps/web-BSM-v2.2.pdf the example should go as far as storing the input in a variable.

    Then lookup SELECT...CASE statements in the Manual, and see how that applies to different possible options.


    Hope this helps,
    Morrolan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Flying is simple. You just throw yourself at the ground and miss.

    "I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image."
    Stephen Hawking
Sign In or Register to comment.