Thermometer / Thermostat problems with display

For C and ASSEMBLY users to post questions and code snippets for programming in C and ASSEMBLY. And for any other C or ASM course related questions.

Moderators: Benj, Mods

Post Reply
cobra1
Posts: 175
Joined: Thu Feb 04, 2010 7:44 am
Has thanked: 3 times
Been thanked: 3 times
Contact:

Thermometer / Thermostat problems with display

Post by cobra1 »

Hi Guys

I have been playing with Flowcode 4 to build a thermostat,

so far i have the ADC input sorted and i have converted the INT value to a temperature value, and i can display this on the lcd

Problem is i want this to be set with a 0.5f resolution so the temperature should read say 87.5f or 90.0 f

this is the part i am struggling on, can anyone help.

would anyone happen to have done this sort of thing before??

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Thermometer / Thermostat problems with display

Post by Benj »

Hello

How are you doing your ADC to temparature conversion? Is it via a lookup table or a real time calculation? If it is a calculation then maybe you can simply store the result in a float variable. Then convert the float to a string and send the string to the LCD.

Post Reply