I'm having a strange to me problem with properly dispalying ADC values on LCD.
I'm using single conversin ADC from two inputs one after another in a loop.
2. LD35 temp sensor
When dispalying temp sensor value on LCD I'm using a function conveting from int to ASCII (itoa function), I have to different approaches:
int adc_value = (Return_adc()*2.5/10); // 'reurn_adc' returns value form adc converter, I'm doing scalling to Celcius
itoa(adc_value, 10, result);
LCD_WiteText (result); // here I get constantly changing values from 19 to 36 ??
itoa((Return_adc()*2.5/10) , 10, result);
LCD_WiteText (result); // here i get constant result of 24 (Celcius), it's ok
What is the difference here, I cant understand it.