No announcement yet.

Simple timer demo to update string

  • Filter
  • Time
  • Show
Clear All
new posts

  • databits
    Hi Paul,

    Sorry, I should have said that I understand it can be done with "print", but in my case I have a "Strings" widget on the screen and would like to print to that.
    Is this possible?

    I will need to print a value on the screen from both a timer (internal code) and from external serial.

    How can this be done? (i.e. a string which is written by both external serial and internal code)

    Thank you

    Leave a comment:

  • pauleilio

    Welcome to the forum.

    You can print or putstr anywhere on the screen.

    Assuming that the font is loaded as hFont1

    txt_FontID(hFont1) ; // Font index correct at time of code generation
    txt_FGcolour(WHITE) ;
    txt_BGcolour(BLACK) ;
    gfx_MoveTo(23 , 35) ;
    print("Hello World") ;

    I hope this helps

    Best regards


    Leave a comment:

  • databits
    started a topic Simple timer demo to update string

    Simple timer demo to update string

    Hi there,

    I'm new to 4D systems displays and struggling somewhat to get a simple program to work.

    Using a Gen4-uLCD-24PT, I've put a string on the screen called "Strings1".
    In code, I have a timer called TIMER1.

    Now, all I want to do is write some text to "Strings1" on each timer event.

    How do I do this? Using putstr?
    I just cannot find a method to wrtie text to an on-screen string!

    Thank you