I’m trying to do a sprintf and I’m only getting constent 0.00000 reading from my analog imput…
What am I doing wrong ??
Is there another way to print decimals on my LCD ?
Thanks
int8 x;
float g;
char msg [10];
char espace [21];
x = read_adc();
g = (x-110)*(1/36);
sprintf(msg, "%f", g);
strcpy(espace, " ");
strcat(msg, espace);
delay_ms(500);
ecrire_chaine(msg);