Shop OBEX P1 Docs P2 Docs Learn Events
How do you create a user interface? — Parallax Forums

How do you create a user interface?

ArchiverArchiver Posts: 46,084
edited 2000-10-09 15:14 in General Discussion
Hi everyone,

I'm fairly new to this eGroups.
I was wondering if there is a way to create a simple user interface
on the Windows Terminal screen. I am currently using the 1.091 beta
version (Stampw.exe).
What i would like to do is ask a question, such as select a servo
number between 1-4.
The user inputs a number. I want to store in this number somewhere.
Ask a second question, Select the range to move to?
The user selects a number between 850 and 3050.
Again i want to store the number.
Using the answer to the first and second question, i wanna be able to
move the corresponding servo and move to the desired range.
So basically what i want to know is how to detect which numbers are
pressed and also how to send it back to the Basic Stamp?
Any ideas would be appreciated. I'm fairly show i connected the
cable's up correctly in order to fit in with the RS-232 settings.
I'm not sure if anyone is familiar with the Next Step Microcontroller
board, but that is what is used to carry the BS2-SX.
When using the pulsout command, pulsout 0,x,
where x is the limit lies between 850 to 3050.
Any help would be great.
Thanks alot.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-10-09 14:56
    Hi everyone,

    I'm fairly new to this eGroups.
    I was wondering if there is a way to create a simple user interface
    on the Windows Terminal screen. I am currently using the 1.091 beta
    version (Stampw.exe).
    What i would like to do is ask a question, such as select a servo
    number between 1-4.
    The user inputs a number. I want to store in this number somewhere.
    Ask a second question, Select the range to move to?
    The user selects a number between 850 and 3050.
    Again i want to store the number.
    Using the answer to the first and second question, i wanna be able to
    move the corresponding servo and move to the desired range.
    So basically what i want to know is how to detect which numbers are
    pressed and also how to send it back to the Basic Stamp?
    Any ideas would be appreciated. I'm fairly show i connected the
    cable's up correctly in order to fit in with the RS-232 settings.
    I'm not sure if anyone is familiar with the Next Step Microcontroller
    board, but that is what is used to carry the BS2-SX.
    When using the pulsout command, pulsout 0,x,
    where x is the limit lies between 850 to 3050.
    Any help would be great.
    Thanks alot.
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-09 15:14
    In a message dated 10/9/00 8:57:40 AM Central Daylight Time,
    alan_correia@h... writes:

    > I'm fairly new to this eGroups.
    > I was wondering if there is a way to create a simple user interface
    > on the Windows Terminal screen. I am currently using the 1.091 beta
    > version (Stampw.exe).
    > What i would like to do is ask a question, such as select a servo
    > number between 1-4.
    > The user inputs a number. I want to store in this number somewhere.
    > Ask a second question, Select the range to move to?
    > The user selects a number between 850 and 3050.
    > Again i want to store the number.
    > Using the answer to the first and second question, i wanna be able to
    > move the corresponding servo and move to the desired range.
    > So basically what i want to know is how to detect which numbers are
    > pressed and also how to send it back to the Basic Stamp?
    > Any ideas would be appreciated. I'm fairly show i connected the
    > cable's up correctly in order to fit in with the RS-232 settings.
    > I'm not sure if anyone is familiar with the Next Step Microcontroller
    > board, but that is what is used to carry the BS2-SX.
    > When using the pulsout command, pulsout 0,x,
    > where x is the limit lies between 850 to 3050.
    > Any help would be great.
    > Thanks alot.


    If you're using the programming port, you can use DEBUG or SEROUT (on pin 16)
    to send messages to the DEBUG window. Use SERIN (on pin 16) setup for 9600
    baud to retrieve data from the user. Use the DEC modifier of SERIN to
    convert the ASCII stream to a variable.

    Something like this:

    DEBUG "Enter servo number: "
    SERIN 16, baud96, [noparse][[/noparse]DEC servo]

    The DEC modifier will take numeric input until a non-number is pressed
    (usually a CR). Do the same thing with the pulse width. I've written a
    couple of programs that accept input through the DEBUG window. It works fine.

    -- Jon Williams
    -- Dallas, TX
Sign In or Register to comment.