Custom variable temp

Do you have a question on how to do something.
Ask in here.
Post Reply
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Custom variable temp

Post by jsclownfish »

I recently added more temp probes and they are working fine displayed on the LCD, but since they aren't bytes they don't display as the temp in ascii. Can you and if so, how do you code to display the temperature? Maybe only the rounded to the whole number if it won't handle the decimal?

Thanks,
-Jon
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Custom variable temp

Post by rimai »

Not sure I follow.
Temperature should be decimal just like the other ones.
Roberto.
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Custom variable temp

Post by jsclownfish »

Yes, it looks fine on the LCD, but I want to track them as a custom variable. It looks like the custom variable is a byte.

-Jon
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Custom variable temp

Post by lnevo »

Those custom variables being bytes are a pain! When can we turn that into ints Roberto (or better yet floats!)

Jon, try dividing the number by 10 and it should fit in the byte, you just won't have the precision but you'll be inside a degree which should work ok, no?
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Custom variable temp

Post by cosmith71 »

I wonder if we could use two variables, one to represent the whole number part and another to represent the decimal part?

Like custom variable 1 would equal 78 and custom variable 2 would equal 10 to represent 78.1.

--Colin
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Custom variable temp

Post by lnevo »

Yes i just can't think of the math this early. Seems a big waste to me though on variable usage. Would still like to see this change to int. too easy to wrap with only a byte. Have hit that too many times.
User avatar
jsclownfish
Posts: 378
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Custom variable temp

Post by jsclownfish »

In my case, I just put my 'less important' temperature probes in the custom variables where the whole number temp is sufficient. I can't afford to use other custom variable slots for the decimal as I have them all tied up with other measurable (flow meters, lights, etc). Maybe more custom variables are in future plans??? ;)

-Jon
Post Reply