Shop OBEX P1 Docs P2 Docs Learn Events
Displaying a variable to a serial LCD — Parallax Forums

Displaying a variable to a serial LCD

ArchiverArchiver Posts: 46,084
edited 2003-08-01 19:20 in General Discussion
I want to write the following to my lcd..

1500 rpm

Where 1500 is a value held in a variable called REVS.

Am i anywhere close with :

SEROUT 1, 16780,(?REVS," rpm",10,13)

Cheers for any advice [noparse];)[/noparse]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-08-01 13:36
    Close. Try this:

    SEROUT 1, 16780, [noparse][[/noparse]DEC REVS, " rpm", 10, 13]

    The 'DEC REVS' will output the value
    converted to a decimal ascii string
    representation.

    --- In basicstamps@yahoogroups.com, "c1aird" <c1aird@y...> wrote:
    > I want to write the following to my lcd..
    >
    > 1500 rpm
    >
    > Where 1500 is a value held in a variable called REVS.
    >
    > Am i anywhere close with :
    >
    > SEROUT 1, 16780,(?REVS," rpm",10,13)
    >
    > Cheers for any advice [noparse];)[/noparse]
  • ArchiverArchiver Posts: 46,084
    edited 2003-08-01 15:33
    c1aird,

    Try:

    SEROUT1,16780, (DEC revs, "rpm",10,13)

    The DEC argument tells the Stamp to display the var revs as a number,
    instead of ASCII.

    Hope this helps,

    Jonathan

    www.madlabs.info



    Original Message
    From: "c1aird" <c1aird@y...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, July 31, 2003 2:01 PM
    Subject: [noparse][[/noparse]basicstamps] Displaying a variable to a serial LCD


    > I want to write the following to my lcd..
    >
    > 1500 rpm
    >
    > Where 1500 is a value held in a variable called REVS.
    >
    > Am i anywhere close with :
    >
    > SEROUT 1, 16780,(?REVS," rpm",10,13)
    >
    > Cheers for any advice [noparse];)[/noparse]
    >
    >
    >
    > 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-08-01 19:20
    Cheers [noparse];)[/noparse]
Sign In or Register to comment.