Shop OBEX P1 Docs P2 Docs Learn Events
input decimal numbers to bs2 — Parallax Forums

input decimal numbers to bs2

ArchiverArchiver Posts: 46,084
edited 2004-05-16 22:57 in General Discussion
In a message dated 5/15/2004 6:37:16 PM Eastern Daylight Time,
grivacoba@y... writes:


> Please let me know what code to use to have two switches to insert
> decimal numbers to stamp2. One of the switches to increase the
> number and the other to decrese it, once you have the number you
> want then load it to stamp2 into a variable, probably with a thirth
> switch or pressing the two swithces at the same time, or just after
> a time interval.
>

I'm not sure what you are trying to do but you might try this:

num var word

sw1 Pin 0
sw2 Pin 1

num = 100

start:
if sw1 = 0 then num = num + 1
if sw2 = 0 then num = num - 1
debug dec ? num, cr
pause 1000
goto start

Sid Weaver
512K plug-in EEPROM.......
http://www.visualmuses.com/chipcircuit/index.html





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

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-05-15 20:28
    Please let me know what code to use to have two switches to insert
    decimal numbers to stamp2. One of the switches to increase the
    number and the other to decrese it, once you have the number you
    want then load it to stamp2 into a variable, probably with a thirth
    switch or pressing the two swithces at the same time, or just after
    a time interval.
    Thanks
    grivacoba@y...
  • ArchiverArchiver Posts: 46,084
    edited 2004-05-16 15:12
    That's not difficult, nor is it trivial -- and cannot be drafted without
    some kind of display. What kind of display are you using?

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: grivacoba [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=6_8WpCPwljJd4dAx7PIGnT9XDf-D4iKDyNwKFLHraO8FkEEdo01J3SROIPsTWs3846BV7AbE9IsU-K_v]grivacoba@y...[/url
    Sent: Saturday, May 15, 2004 2:29 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] input decimal numbers to bs2


    Please let me know what code to use to have two switches to insert
    decimal numbers to stamp2. One of the switches to increase the
    number and the other to decrese it, once you have the number you
    want then load it to stamp2 into a variable, probably with a thirth
    switch or pressing the two swithces at the same time, or just after
    a time interval.
    Thanks
    grivacoba@y...




    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.

    Yahoo! Groups Links







    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2004-05-16 22:57
    Jon Williams <jwilliams@p...> wrote:
    That's not difficult, nor is it trivial -- and cannot be drafted without
    some kind of display. What kind of display are you using?


    Original Message
    From: grivacoba [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=hsUQ5t0Q7xQW7ica4o8VoszkIxMNYyPlheCZETK3Hg9US4MxTPeiGyTzOnfDttltKyf7BMaDIuwpM3o]grivacoba@y...[/url
    Sent: Saturday, May 15, 2004 2:29 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] input decimal numbers to bs2


    Please let me know what code to use to have two switches to insert
    decimal numbers to stamp2. One of the switches to increase the
    number and the other to decrese it, once you have the number you
    want then load it to stamp2 into a variable, probably with a thirth
    switch or pressing the two swithces at the same time, or just after
    a time interval.
    Thanks
    grivacoba@y...

    Jon thanks for your help. I'm using an inexpansive LCD display 16x2 AC162A.

    And the intention is to have an input number into a variable to be compare with another variable to output a result ig: if number_in = number_var then output

    grivacoba










    Do you Yahoo!?
    SBC Yahoo! - Internet access at a great low price.

    [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.