Question
UART received value conversion to float
Posted on December 30, 2012 at 21:28
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. #tags-are-pointless #stm32f0-usart #lacks-specificity #connect-uart-to-pc