Uart to int conversion
Hi
im hoping someone can help me, honestly it might be a easy thing to do, however i have been cracking my brain around this and can't seem to get it to work.
uint8_t Rx_data[6] = {0};
HAL_UART_Receive(&huart1, Rx_data, 6, 1000);
printf("%s\n", Rx_data);
above is my code that reads from the serial port and outputs the data of what has been passed to the microcontroller
*030,R
*023,A
*046,A
*015,R
above is what the data looks like and i need to get the numbers and convert them to a int so i can use them in a if statement as an example
if(5 > (int value){
//do something
}
if someone could help that would be great
Thank you
EDIT: Edited by ST Moderator to add the right Topics.
