2022-03-18 02:05 PM
2022-03-18 02:24 PM
Imagine you're not using an STM32, and just code it in C, perhaps trying building and understanding the equivalent code on a PC?
Do you understand how data is stored in memory?
Do you understand how to do decimal to/from binary, from first principles?
An array[3] of what?
int foo = 1234;
HAL_UART_Transmit(hUART, (uint8_t*)&foo, sizeof(foo), 100); // Send the bytes behind an int
int array[3] = { 1, 2, 3};
HAL_UART_Transmit(hUART, (uint8_t*)array, sizeof(array), 100); // Send the bytes behind an int array
You looking for itoa() ?
2022-03-18 02:24 PM
Imagine you're not using an STM32, and just code it in C, perhaps trying building and understanding the equivalent code on a PC?
Do you understand how data is stored in memory?
Do you understand how to do decimal to/from binary, from first principles?
An array[3] of what?
int foo = 1234;
HAL_UART_Transmit(hUART, (uint8_t*)&foo, sizeof(foo), 100); // Send the bytes behind an int
int array[3] = { 1, 2, 3};
HAL_UART_Transmit(hUART, (uint8_t*)array, sizeof(array), 100); // Send the bytes behind an int array
You looking for itoa() ?
2022-03-18 03:10 PM
Before programming microcontrollers, one has to learn programming in general and the basics of the C language. Without that there is no chance of developing anything usable or even working at all. One can start here:
https://www.tutorialspoint.com/cprogramming/
https://www.cprogramming.com/tutorial/c-tutorial.html
And then continue here:
2022-03-19 03:51 AM
Thanks for you
2022-03-19 03:51 AM
Thanks for you