2021-03-17 10:29 AM
2021-03-17 12:19 PM
What have you done so far? Have you tried printf()/scanf() variants?
JW
2021-03-17 06:17 PM
Please send the one example of sending and receiving
2021-03-17 09:33 PM
You'd send 16-bit values as two consecutive 8-bit values.
Or do you actually want to send as ASCII numeric values, ie 0-9 digits and as "12345" type string
Perhaps find some texts of numeric representation in micro-controllers.
2021-03-18 03:35 AM
HAL_UART_Receive(&huart1,&HMI,1, 1);
if(HMI>215){ HAL_GPIO_WritePin(TRIACK_GPIO_Port, TRIACK_Pin, GPIO_PIN_SET); }
But this code is no work
2021-03-18 05:07 AM
"this code is no work"
You need to give more detail than that: http://www.catb.org/esr/faqs/smart-questions.html#code
Don't try to solve multiple problems all at once: concentrate on just one at a time. So, before worrying about the ADC, have you got the serial comms fully debugged an working?
See: https://www.avrfreaks.net/comment/3104576#comment-3104576
And: https://www.avrfreaks.net/comment/1138166#comment-1138166
This is basic problem-solving stuff - not specific to microcontrollers or programming: