float time = 0.1;int exponent = (int)time; //exponent is the number to the left of the decimal pointtime -= (float)exponent; //remove the exponent to leave just the fraction.int fraction = (int)(time*10.0); //fraction is the 1st number to the right of the decimal pointchar timechar[5] = {0};sprintf(buffer,"%d.%d",exponent,fraction);uoled.TextGraphic(5,40, 1, 150, 1, 1, timechar, 1);

float someFloat;float time = 0.1;int exponent = (int)someFloat; //exponent is the number to the left of the decimal pointtime -= (float)exponent; //remove the exponent to leave just the fraction.int fraction = (int)(someFloat*10.0); //fraction is the 1st number to the right of the decimal pointchar timechar[5] = {0};sprintf(timechar,"%d.%d",exponent,fraction);uoled.TextGraphic(5,40, 1, 150, 1, 1, timechar, 1);

int exponent = (int)someFloat; //exponent is the number to the left of the decimal pointtime -= (float)exponent; //remove the exponent to leave just the fraction.int fraction = (int)(someFloat*10.0); //fraction is the 1st number to the right of the decimal pointchar timechar[5] = {0};sprintf(timechar,"%d.%d Seconds",exponent,fraction);uoled.TextGraphic(5,40, 1, 150, 1, 1, timechar, 1);delay(100);}

And now when it's counting it does fine, until it reaches one second, after that it does this:1.101.111.121.131.14~1.192.202.21~2.293.30

int fraction = (int)(someFloat*10.0); //fraction is the 1st number to the right of the decimal pointMultiplying someFloat by 10, without having removed the integer portion will NOT give you correct results.

int integral = (int)someFloat; //integral is the number to the left of the decimal pointint fraction = (int)((someFloat - integral)*10.0); //remove integral to leave just fraction, fraction is the 1st number to the right of the decimal pointchar timechar[5] = {0};sprintf(timechar,"%d.%d Seconds",integral,fraction);uoled.TextGraphic(5,40, 1, 150, 1, 1, timechar, 1);