Solved
Hi. I will send the data from the temperature sensor with the RF module. I can send unsigned char with RF module. Data integer from temperature and humidity sensor. How can I convert an integer data type to an unsigned char data type?
..
..
No doubt the RF module sends bytes, not any particular data type. How you interpret those bytes on the other end is up to the receiving software. Provide a pointer to the data using a cast.
int x = 67;
HAL_UART_Transmit(huart1, (unsigned char *) &x, sizeof(x), 0);Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.