Hi,
I want to add .1 to a float variable in a loop and use sprintf to convert it to its equivalent ascii values which are stored in buffer. Here is the main loop. This works when I use a int and use %d in the sprintf function but for some reason it keeps giving me an error if I try and use %f.
void main(void)
{
float count = 1;
char buffer[50];
for(;; )
{
count = count + .1;
sprintf(buffer, "%f",count);
}
return;
}