Page 1 of 1

How to display text variables???

Posted: 14 Dec 2020, 11:44
by apocalipsis1234
(Sorry for my English)...

What I want: publish in one oled display diferent texts depending on the value of a temperature...

How??? I have created a dummy device, and seems to do with "taskvalue"... problem: taksvalue and dummy device only support numeric data, so how can i do it (if possible)???

Re: How to display text variables???

Posted: 14 Dec 2020, 14:20
by Ath
For both OLed displays there are commands available to place texts on the screen, documentation on that is available here: P023 (wiki) and P036 (ReadTheDocs)
These commands can be used in Rules (enable from Tools/Advanced if not available as a tab)

Using P23 you could use something like this:

Code: Select all

on sensor#temperature do // Use the name of your Device taskname and variable
  if %eventvalue%<10
    oled,4,15,"Cold"
  elseif %eventvalue%<18
    oled,4,15,"Chilly"
  elseif %eventvalue%<22
    oled,4,15,"Comfortable"
  elseif %eventvalue%<25
    oled,4,15,"Warm"
  else
    oled,4,15,"Hot"
  endif
endon

Re: How to display text variables???

Posted: 14 Dec 2020, 14:24
by apocalipsis1234
Thanks,i Will try

Re: How to display text variables???

Posted: 14 Dec 2020, 17:56
by apocalipsis1234
It works... thanks