Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
display an Int or float variable in a container
Hi all,
My question will probably be considered as coming from a newbie. That is true, but I spent so many time on examples to unsuccessfully solve it, that I finally require your help.
I would like "simply" know how to display one (or more) values int (integer like "28") or float (like "12.7") or a string, being calculated by the controlller.
In other terms, is there a "bridge" to include a variable name into a Panel string, and display the value whereever in a container ?
I join a modifed scrrenshot of one of my panels layout to indicate (red frame) an example of what I need :
[Image: b8a1db2]
Thanks for your help
I finally found deeply hidden in an example...
(07-26-2017, 08:12 PM)jackjean Wrote: I finally found deeply hidden in an example...

The simple way is by using the MESSAGE object, like that used in this example:

So, you have a panel in which you have the messagge object with ID =1, like this:

Dg14;{%100,y100^M1*30:text;}        Try with simulator

and  your float variable is named "float_data", to update the message on the panel you can use:

 Serial.print("#M1");  Serial.println(float_data ,DEC);

Forum Jump:

Users browsing this thread: 1 Guest(s)