Shop OBEX P1 Docs P2 Docs Learn Events
LCD Code — Parallax Forums

LCD Code

rb2005rb2005 Posts: 2
edited 2005-05-31 12:23 in General Discussion
I am useing bs2 the editor won't take commas. I wanted send battery voltage to
the LCD along with status of the battery so ineed to be able display a variable.
thanks rb2005

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-31 12:23
    Sure it will -- but it you want to use it as a character in an output you need to enclose it in quotes.· Try this:

    DEBUG ","

    I realize that can be tricky in some strings of serial data, so what I do is define a contant:

    Comma··· CON··· 44

    Then I can do this:

    · volts = 125
    · DEBUG· DEC (volts / 100), Comma, DEC2 volts··· ' display volts Euro-style

    Remember that DEBUG is just a specialized version of SEROUT, so these techniques will work in your application.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.