LCD: right-aligned values ???

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
M*I*B
Normal user
Posts: 67
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

LCD: right-aligned values ???

#1 Post by M*I*B » 05 Jul 2019, 19:25

Hi there again,

on a 07S I use a BM280, a lightsensor BH1750FUI and a 4x20 LCD. Temp. and Humity are well formed and takes 5 digits (when the temperature reaches 100 ° C, nobody will be there to read it :lol: ). Pressure are most also takes 7 Digits, somtetimes 6.
But the Lightsensor gives values from 0.00 up to more then 40000.00 LUX. Ok... In nature more then 9000 I don't await but then it jump's arround between 5.00 and 9000.00 ...

At the LCD there is no option to align values on the right side... So if there a way by formulas inside the Options of the Sensor itselfe to say i.e. "If one character before the comma fill with 3 spaces, if 2 before fill with 2 spaces....) ???
DLzG
Micha

User avatar
grovkillen
Core team member
Posts: 3140
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: LCD: right-aligned values ???

#2 Post by grovkillen » 05 Jul 2019, 19:27

I use percent instead of the actual value since 4768 lux doesn't do it for me. I like 1...100% better. But that's me I guess.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
grovkillen
Core team member
Posts: 3140
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: LCD: right-aligned values ???

#3 Post by grovkillen » 05 Jul 2019, 19:30

That being said. You can do left of right align, can't remember the syntax just now but you need to use rules.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
grovkillen
Core team member
Posts: 3140
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: LCD: right-aligned values ???

#4 Post by grovkillen » 05 Jul 2019, 19:36

I haven't been able to add it to the docs but here's the PR describing it:

https://github.com/letscontrolit/ESPEasy/pull/1289
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
M*I*B
Normal user
Posts: 67
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: LCD: right-aligned values ???

#5 Post by M*I*B » 05 Jul 2019, 19:52

... ok, I have read it but I just understand... nothing :cry:
DLzG
Micha

User avatar
grovkillen
Core team member
Posts: 3140
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: LCD: right-aligned values ???

#6 Post by grovkillen » 05 Jul 2019, 20:24

Lets say your task is called "sun" and its value is named "lux" you could do this (in rules)

[sun#lux#R#P2]

To justify the value to the right and add two spaces on the left of the value.

Just as one example.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
M*I*B
Normal user
Posts: 67
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: LCD: right-aligned values ???

#7 Post by M*I*B » 05 Jul 2019, 20:28

AHHHH! Ty a lot! Now I get it (I hope)
DLzG
Micha

User avatar
grovkillen
Core team member
Posts: 3140
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: LCD: right-aligned values ???

#8 Post by grovkillen » 05 Jul 2019, 20:44

Enjoy!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
M*I*B
Normal user
Posts: 67
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: LCD: right-aligned values ???

#9 Post by M*I*B » 05 Jul 2019, 20:58

.. nope ... I'm too dumb for that :cry:

Where I have to insert it? In the Formula-field at the sensor or in the line-field at the display?
Attachments
capture_002_05072019_205641.jpg
capture_002_05072019_205641.jpg (47.62 KiB) Viewed 1571 times
capture_001_05072019_205549.jpg
capture_001_05072019_205549.jpg (43.39 KiB) Viewed 1571 times
DLzG
Micha

User avatar
grovkillen
Core team member
Posts: 3140
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: LCD: right-aligned values ???

#10 Post by grovkillen » 05 Jul 2019, 21:01

If it's not working to add that to those [....] Inside the settings of the LCD task you need to use the LCD command inside rules.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
M*I*B
Normal user
Posts: 67
Joined: 22 Jan 2018, 15:47
Location: Germany
Contact:

Re: LCD: right-aligned values ???

#11 Post by M*I*B » 05 Jul 2019, 21:22

... ok, I'm sorry but I'm realy too dumb to handle that...
I have searching arround the forum and other but don't find an exsample for that how I can see howto ...

Not so important... It's ok what I have now. The little bad thing is accepted ...
DLzG
Micha

User avatar
grovkillen
Core team member
Posts: 3140
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: LCD: right-aligned values ???

#12 Post by grovkillen » 05 Jul 2019, 22:12

Sleep on it and give it another try another day. Never give up.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest