add a decimal

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

foppa
Posts: 45
Joined: Sat Dec 20, 2008 1:55 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

add a decimal

Postby foppa » Mon Apr 05, 2010 6:06 pm

is it possible to add a decimal for display of temperature
as 21.6 ° C
Have a lm335 measuring

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8335
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2382 times
Been thanked: 3393 times
Contact:

Re: add a decimal

Postby medelec35 » Mon Apr 05, 2010 8:27 pm

One way is to use Float and string function
See: viewtopic.php?f=29&t=7139&p=17421
by Benj on Fri Feb 26, 2010 4:09 pm
Download:StringLCD.fcf
Credit goes to both Benj and Taurus.
Another way would be to convert number to a string, then use left$ string function then add decimal string, then add right$ string function, depending on what the byte or int value is.
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.