GUI-O Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Text from String Var using Label on page0

    Scheduled Pinned Locked Moved
    Comments & Feedback
    2
    3
    53
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sato
      last edited by Sato

      Hello kl3m3n,

      How can this work using the label widget?
      I tried a lot of possibilities, but i do it wrong.
      I want write the counter number on page0

      byte counter = 0;
      String signal = "";

      loop
      counter++;
      signal =String(counter );
      text = "TXT:"<font color=\u0022red\u0022>" signal "</font>"\r\n";
      mqttClient.publish(&In[0], "@lb88 X:5 Y:47.5 SCI:0 VIS:1 &text[0]");

      Thank you

      Best regards

      K 1 Reply Last reply Reply Quote 0
      • K
        kl3m3n @Sato
        last edited by kl3m3n

        @Sato Hi.

        Try:

        String text = "TXT:\"" + String(counter) + "\"\r\n";
        String payload = String("@lb88 X:5 Y:47.5 SCI:0 VIS:1 FGC:#FF0000 ") + text;
        mqttClient.publish(&In[0], payload.c_str());
        

        Kl3m3n

        S 1 Reply Last reply Reply Quote 0
        • S
          Sato @kl3m3n
          last edited by

          Hello @kl3m3n,

          Works very good, Thank You

          Best regards

          1 Reply Last reply Reply Quote 1
          • First post
            Last post