Text from String Var using Label on page0
-
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 page0byte 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
-
@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
-