AnsweredAssumed Answered

UART received value conversion to float

Question asked by perera.duminda on Dec 30, 2012
Latest reply on Dec 31, 2012 by perera.duminda
I have been working on a program to directly transmit any character or set of characters that I transmit from the PC via UART, back to the PC immediately. This is just the first step in my project.

Code (this works):
    while(1) {
        int8_t buffer[20];
        scanf("%s", buffer);
        printf("%s\n", buffer);
        STM_EVAL_LEDToggle(LED4);
    }


Next I want use the value I receive from the PC for some mathematical operations in 'float' data type.

Can anyone please tell me how to covert the value received 'buffer' to a float value?

'Thank You' in advance.

Outcomes