Question
float to char buffer in c using SPRINTF not work.
I want to display floating point number on 8digit 7segment display MAX7219 so i want to convert float value in to char buffer using sprintf() but it not gives exact output
True Studio STM32F103
void display_charDigit(float Value){
char buffer[8];
sprintf(buffer,"%2.3f",Value);
for (uint8_t digit = 6; digit > 0; digit--) {
write_char((7-digit),buffer[6-digit],false);
}
}
while(){
display_charDigit(12.345);
}